diff options
author | Thomas Grainger <tagrain@gmail.com> | 2016-09-12 19:37:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-12 19:37:16 +0100 |
commit | 4572ffd483bf69130f5680429d559e2810b7f0e9 (patch) | |
tree | 53fade8a12f62bf3da0260a21b314b916524ae4a | |
parent | 48c149c16a9bb06591c2eb0be4cca729b7feac3e (diff) | |
download | gitpython-4572ffd483bf69130f5680429d559e2810b7f0e9.tar.gz |
install ordereddict only on 2.6 with wheel
-rwxr-xr-x | setup.py | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -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( |