Closed gholms closed 9 years ago
I'm looking to correct this using environment markers such as below. This works on 2.7 (in a virtualenv) but I see it still installs argparse due to another package requiring it apparently. (it installs argparse 1.3.0 whereas below I ask for 1.2.2).
diff --git a/setup.py b/setup.py
index 39146ef..a145ff7 100644
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,8 @@ from distutils.command.sdist import sdist
import os.path
import subprocess
import glob
+import multiprocessing
+import sys
from setuptools import setup, find_packages
@@ -87,8 +89,9 @@ setup(
packages=find_packages(),
test_suite='nose.collector',
tests_require=['nose'],
- install_requires=['fabric', 'PyYaml', 'argparse', 'stevedore', 'sphinx',
- 'pbr >= 0.10.7', 'six >= 1.9.0'],
+ setup_requires=['pbr==0.11.0'] + (['argparse<=1.2.2'] if sys.version_info[:2] == (2, 6) else []),
+ install_requires=['pbr==0.11.0', 'fabric', 'PyYaml', 'stevedore<1.4.0', 'sphinx']
+ + (['argparse<=1.2.2'] if sys.version_info[:2] == (2, 6) else []),
scripts=['bin/calyptos'],
classifiers=[
'Development Status :: 5 - Production/Stable',
Fixed here: e4b95c646bcd9f85338192aab86d735fa52d19e1
The argparse module is part of the python standard library beginning with python 2.7. When run on a system with that version, setup.py still wants to download and install argparse despite that. The
install_requires
list should probably be defined in an if statement earlier in the file to prevent that from happening.