Skip to content

Commit c618928

Browse files
committed
fix: update setup.py requirements to match requirements.txt
1 parent 5ef9794 commit c618928

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import os
1717
import sys
18+
import pkg_resources
1819
from setuptools import setup, find_packages
1920
from setuptools.command.test import test as TestCommand
2021

@@ -30,6 +31,10 @@
3031
os.system('python setup.py sdist upload -r pypi')
3132
sys.exit()
3233

34+
with open('requirements.txt') as f:
35+
install_requires = [str(req) for req in pkg_resources.parse_requirements(f)]
36+
with open('requirements-dev.txt') as f:
37+
tests_require = [str(req) for req in pkg_resources.parse_requirements(f)]
3338

3439
class PyTest(TestCommand):
3540
def finalize_options(self):
@@ -49,8 +54,8 @@ def run_tests(self):
4954
version=__version__,
5055
description='Core library used by SDKs for IBM Cloud Services',
5156
license='Apache 2.0',
52-
install_requires=['requests>=2.0, <3.0', 'python_dateutil>=2.5.3', 'PyJWT >=1.7.1'],
53-
tests_require=['responses', 'pytest', 'pytest-rerunfailures', 'tox', 'pylint', 'bumpversion'],
57+
install_requires=install_requires,
58+
tests_require=tests_require,
5459
cmdclass={'test': PyTest},
5560
author='IBM',
5661
author_email='[email protected]',

0 commit comments

Comments
 (0)