Skip to content

Commit 4572ffd

Browse files
authored
install ordereddict only on 2.6 with wheel
1 parent 48c149c commit 4572ffd

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

setup.py

+17-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,23 @@ def _stamp_version(filename):
6868
print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr)
6969

7070
install_requires = ['gitdb >= 0.6.4']
71-
if sys.version_info[:2] < (2, 7):
72-
install_requires.append('ordereddict')
71+
extras_require = {
72+
':python_version == "2.6"': ['ordereddict'],
73+
}
74+
75+
try:
76+
if 'bdist_wheel' not in sys.argv:
77+
for key, value in extras_require.items():
78+
if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
79+
install_requires.extend(value)
80+
except Exception:
81+
logging.getLogger(__name__).exception(
82+
'Something went wrong calculating platform specific dependencies, so '
83+
"you're getting them all!"
84+
)
85+
for key, value in extras_require.items():
86+
if key.startswith(':'):
87+
install_requires.extend(value)
7388
# end
7489

7590
setup(

0 commit comments

Comments
 (0)