From 74b921bbfe5597d14529616c9c33efa2991b5d30 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 15 Jul 2018 02:12:07 +0200 Subject: [PATCH] setup.py: fix requirements Fixes https://github.com/Kuniwak/vint/issues/287 --- setup.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index e6f3477..d227143 100644 --- a/setup.py +++ b/setup.py @@ -8,19 +8,13 @@ def load_requires_from_file(filepath): return [pkg_name.rstrip('\r\n') for pkg_name in open(filepath).readlines()] -def install_requires(): - requires = load_requires_from_file('requirements.txt') - if sys.version_info < (3, 4): - # To enable Enum in Python < 3.4 - requires.append('enum34 >= 1.0.4') - # To enable pathlib in Python < 3.4 - requires.append('pathlib == 1.0.1') - - if sys.version_info < (3, 6): - # To enable typing in Python < 3.6 - requires.append('typing >= 3.6.2') - - return requires +install_requires = load_requires_from_file('requirements.txt') +install_requires += [ + 'setuptools>=36.2.2', # for enhanced marker support (used below). + 'enum34>=1.0.4;python_version<"3.4"', + 'pathlib==1.0.1>=1.0.4;python_version<"3.4"', + 'typing>=3.6.2;python_version<"3.6"', +] def test_requires(): @@ -48,7 +42,7 @@ def get_version(): author_email='orga.chem.job+vint@gmail.com', url='https://github.com/Kuniwak/vint', download_url='https://github.com/Kuniwak/vint/archive/v{version}.tar.gz'.format(version=VERSION), - install_requires=install_requires(), + install_requires=install_requires, tests_require=test_requires(), packages=find_packages(exclude=['dev_tool', 'test*']), package_data={