diff options
author | Roman Lacko <backup.rlacko@gmail.com> | 2013-06-13 12:38:24 +0200 |
---|---|---|
committer | Roman Lacko <backup.rlacko@gmail.com> | 2013-06-13 12:38:24 +0200 |
commit | a0cc5c1294b2f61d6ad466b79c2224dc2282aa4b (patch) | |
tree | 3826ce533fcbb1e7285ffeb931fdac640cc4cfa4 | |
parent | 27506d902375be214423ea3431c5cb4c2244f895 (diff) |
Update distribute_setup to latest version
-rw-r--r-- | distribute_setup.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/distribute_setup.py b/distribute_setup.py index cb9335605..c67b75247 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ except ImportError: args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.43" +DEFAULT_VERSION = "0.6.45" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" @@ -144,6 +144,16 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: try: import pkg_resources + + # Setuptools 0.7b and later is a suitable (and preferable) + # substitute for any Distribute version. + try: + pkg_resources.require("setuptools>=0.7b") + return + except (pkg_resources.DistributionNotFound, + pkg_resources.VersionConflict): + pass + if not hasattr(pkg_resources, '_distribute'): if not no_fake: _fake_setuptools() |