| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,8 @@ | |||
| 9 | 9 | ||
| 10 | 10 | from distutils.command.build_py import build_py as _build_py | |
| 11 | 11 | from setuptools.command.sdist import sdist as _sdist | |
| 12 | + import pkg_resources | ||
| 13 | + import logging | ||
| 12 | 14 | import os | |
| 13 | 15 | import sys | |
| 14 | 16 | from os import path | |
@@ -68,8 +70,23 @@ def _stamp_version(filename): | |||
| 68 | 70 | print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr) | |
| 69 | 71 | ||
| 70 | 72 | install_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) | ||
| 73 | 90 | # end | |
| 74 | 91 | ||
| 75 | 92 | setup( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments