2019-08-19 22:56:57 +01:00
|
|
|
from itertools import chain
|
2015-06-14 21:27:53 -07:00
|
|
|
|
2019-08-19 22:56:57 +01:00
|
|
|
from setuptools import setup
|
|
|
|
from setuptools.config import read_configuration
|
2018-02-17 13:54:34 +01:00
|
|
|
|
2019-08-19 22:56:57 +01:00
|
|
|
################################################################################
|
|
|
|
# Programmatically generate some extras combos.
|
|
|
|
################################################################################
|
|
|
|
extras = read_configuration("setup.cfg")["options"]["extras_require"]
|
2015-06-14 21:27:53 -07:00
|
|
|
|
2019-08-19 22:56:57 +01:00
|
|
|
# Dev is everything
|
|
|
|
extras["dev"] = list(chain(*extras.values()))
|
2015-06-14 21:27:53 -07:00
|
|
|
|
2019-08-19 22:56:57 +01:00
|
|
|
# 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()))
|
2014-04-27 17:31:10 -07:00
|
|
|
|
2019-08-19 22:56:57 +01:00
|
|
|
setup(extras_require=extras, use_scm_version=True)
|