| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -68,8 +68,23 @@ def _stamp_version(filename): | |||
| 68 | 68 | print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr) | |
| 69 | 69 | ||
| 70 | 70 | 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) | ||
| 73 | 88 | # end | |
| 74 | 89 | ||
| 75 | 90 | setup( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments