summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Grainger <tagrain@gmail.com>2016-09-12 19:37:16 +0100
committerGitHub <noreply@github.com>2016-09-12 19:37:16 +0100
commit4572ffd483bf69130f5680429d559e2810b7f0e9 (patch)
tree53fade8a12f62bf3da0260a21b314b916524ae4a
parent48c149c16a9bb06591c2eb0be4cca729b7feac3e (diff)
downloadgitpython-4572ffd483bf69130f5680429d559e2810b7f0e9.tar.gz
install ordereddict only on 2.6 with wheel
-rwxr-xr-xsetup.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 05c12b8f..15e4571b 100755
--- a/setup.py
+++ b/setup.py
@@ -68,8 +68,23 @@ def _stamp_version(filename):
print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr)
install_requires = ['gitdb >= 0.6.4']
-if sys.version_info[:2] < (2, 7):
- install_requires.append('ordereddict')
+extras_require = {
+ ':python_version == "2.6"': ['ordereddict'],
+}
+
+try:
+ if 'bdist_wheel' not in sys.argv:
+ for key, value in extras_require.items():
+ if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
+ install_requires.extend(value)
+except Exception:
+ logging.getLogger(__name__).exception(
+ 'Something went wrong calculating platform specific dependencies, so '
+ "you're getting them all!"
+ )
+ for key, value in extras_require.items():
+ if key.startswith(':'):
+ install_requires.extend(value)
# end
setup(