From cbe96f6f0322c2e0b8e2625a78db545973102088 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Tue, 26 Dec 2017 13:35:06 -0500 Subject: [PATCH] setup: Declare dependencies for nbpy2017 importer. --- setup.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index a73d028..8d8be50 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,23 @@ #!/usr/bin/env python3 +import itertools + from setuptools import setup, find_packages +REQUIREMENTS = { + 'install_requires': ['babel'], + 'setup_requires': ['pytest-runner'], + 'extras_require': { + 'nbpy2017': ['beautifulsoup4', 'html5lib'], + }, +} + +REQUIREMENTS['tests_require'] = [ + 'pytest', + 'PyYAML', + *itertools.chain(*REQUIREMENTS['extras_require'].values()), +] + setup( name='import2ledger', description="Import different sources of financial data to Ledger", @@ -10,12 +26,10 @@ setup( author_email='brettcsmith@brettcsmith.org', license='GNU AGPLv3+', - install_requires=['babel'], - setup_requires=['pytest-runner'], - tests_require=['pytest', 'PyYAML'], - packages=find_packages(include=['import2ledger', 'import2ledger.*']), entry_points={ 'console_scripts': ['import2ledger = import2ledger.__main__:main'], }, + + **REQUIREMENTS, )