Update st2client setup.py file to dynamically load requirements from
requirements.txt file.
This is now possible since we install pip 9.0.0 in pack and st2
virtual environments.
Keep in mind that this won't work with very old versions of pip
(< 9.0).
@@ -18,19 +18,20 @@ import os.path
from setuptools import setup, find_packages
-# Note: We should re-enable usage of dist_utils once we ensure
-# that we install new version of virtualenv which ships with
-# pip >= 6.1 in all the environments
-# from dist_utils import fetch_requirements
-# from dist_utils import apply_vagrant_workaround
+from dist_utils import check_pip_version
+from dist_utils import fetch_requirements
+from dist_utils import apply_vagrant_workaround
+
from st2client import __version__
+check_pip_version()
+
ST2_COMPONENT = 'st2client'
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
REQUIREMENTS_FILE = os.path.join(BASE_DIR, 'requirements.txt')
-# install_reqs, dep_links = fetch_requirements(REQUIREMENTS_FILE)
-# apply_vagrant_workaround()
+install_reqs, dep_links = fetch_requirements(REQUIREMENTS_FILE)
+apply_vagrant_workaround()
setup(
name=ST2_COMPONENT,
@@ -52,20 +53,8 @@ setup(
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7'
],
- install_requires=[
- 'argcomplete',
- 'jsonpath-rw>=1.4.0',
- 'prettytable',
- 'prompt-toolkit==1.0.15',
- 'python-dateutil',
- 'python-editor==1.0.3',
- 'pytz==2018.4',
- 'pyyaml<4.0,>=3.12',
- 'requests[security]<2.15,>=2.14.1',
- 'six==1.11.0',
- 'sseclient==0.0.19'
- ],
- dependency_links=[],
+ install_requires=install_reqs,
+ dependency_links=dep_links,
test_suite=ST2_COMPONENT,
zip_safe=False,
include_package_data=True,
