| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -136,4 +136,4 @@ return to a proper state, which means | |||
| 136 | 136 | * no open pull requests | |
| 137 | 137 | * no open issues describing bugs | |
| 138 | 138 | ||
| 139 | - [contributing]: https://github.com/gitpython-developers/GitPython/blob/master/README.md | ||
| 139 | + [contributing]: https://github.com/gitpython-developers/GitPython/blob/master/CONTRIBUTING.md | ||
| 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,10 +70,26 @@ 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 | - test_requires = ['node', 'ddt'] | ||
| 73 | + extras_require = { | ||
| 74 | + ':python_version == "2.6"': ['ordereddict'], | ||
| 75 | + } | ||
| 76 | + test_requires = ['ddt'] | ||
| 72 | 77 | if sys.version_info[:2] < (2, 7): | |
| 73 | - install_requires.append('ordereddict') | ||
| 74 | 78 | test_requires.append('mock') | |
| 79 | + | ||
| 80 | + try: | ||
| 81 | + if 'bdist_wheel' not in sys.argv: | ||
| 82 | + for key, value in extras_require.items(): | ||
| 83 | + if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]): | ||
| 84 | + install_requires.extend(value) | ||
| 85 | + except Exception: | ||
| 86 | + logging.getLogger(__name__).exception( | ||
| 87 | + 'Something went wrong calculating platform specific dependencies, so ' | ||
| 88 | + "you're getting them all!" | ||
| 89 | + ) | ||
| 90 | + for key, value in extras_require.items(): | ||
| 91 | + if key.startswith(':'): | ||
| 92 | + install_requires.extend(value) | ||
| 75 | 93 | # end | |
| 76 | 94 | ||
| 77 | 95 | setup( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments