File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 99
1010from distutils .command .build_py import build_py as _build_py
1111from setuptools .command .sdist import sdist as _sdist
12+ import pkg_resources
13+ import logging
1214import os
1315import sys
1416from os import path
@@ -68,8 +70,23 @@ def _stamp_version(filename):
6870 print ("WARNING: Couldn't find version line in file %s" % filename , file = sys .stderr )
6971
7072install_requires = ['gitdb >= 0.6.4' ]
71- if sys .version_info [:2 ] < (2 , 7 ):
72- install_requires .append ('ordereddict' )
73+ extras_require = {
74+ ':python_version == "2.6"' : ['ordereddict' ],
75+ }
76+
77+ try :
78+ if 'bdist_wheel' not in sys .argv :
79+ for key , value in extras_require .items ():
80+ if key .startswith (':' ) and pkg_resources .evaluate_marker (key [1 :]):
81+ install_requires .extend (value )
82+ except Exception :
83+ logging .getLogger (__name__ ).exception (
84+ 'Something went wrong calculating platform specific dependencies, so '
85+ "you're getting them all!"
86+ )
87+ for key , value in extras_require .items ():
88+ if key .startswith (':' ):
89+ install_requires .extend (value )
7390# end
7491
7592setup (
You can’t perform that action at this time.
0 commit comments