forked from sunpy/sunkit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·26 lines (22 loc) · 948 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
import os
from itertools import chain
from extension_helpers import get_extensions
from setuptools import setup
from setuptools.config import read_configuration
################################################################################
# Programmatically generate some extras combos.
################################################################################
extras = read_configuration("setup.cfg")["options"]["extras_require"]
# Dev is everything
extras["dev"] = list(chain(*extras.values()))
# All is everything but tests and docs
exclude_keys = ("tests", "docs", "dev")
ex_extras = dict(filter(lambda i: i[0] not in exclude_keys, extras.items()))
# Concatenate all the values together for 'all'
extras["all"] = list(chain.from_iterable(ex_extras.values()))
setup(
extras_require=extras,
use_scm_version={"write_to": os.path.join("sunkit_image", "_version.py")},
ext_modules=get_extensions(),
)