Skip to content

Commit

Permalink
setup.py: fix requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jul 15, 2018
1 parent 93e8753 commit 74b921b
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -48,7 +42,7 @@ def get_version():
author_email='[email protected]',
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={
Expand Down

0 comments on commit 74b921b

Please sign in to comment.