Codebase list drms / ee86fc99-460d-40ef-abc9-4b8bafb07429/main setup.py
ee86fc99-460d-40ef-abc9-4b8bafb07429/main

Tree @ee86fc99-460d-40ef-abc9-4b8bafb07429/main (Download .tar.gz)

setup.py @ee86fc99-460d-40ef-abc9-4b8bafb07429/mainraw · history · blame

#!/usr/bin/env python
import os
from itertools import chain

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(*list(extras.values())))

# All is everything but tests and docs
exclude_keys = ('tests', 'docs', 'dev')
ex_extras = dict([i for i in list(extras.items()) if i[0] not in exclude_keys])
# Concatenate all the values together for 'all'
extras['all'] = list(chain.from_iterable(list(ex_extras.values())))

setup(
    extras_require=extras, use_scm_version={'write_to': os.path.join('drms', '_version.py')},
)