From a0cc5c1294b2f61d6ad466b79c2224dc2282aa4b Mon Sep 17 00:00:00 2001 From: Roman Lacko Date: Thu, 13 Jun 2013 12:38:24 +0200 Subject: Update distribute_setup to latest version --- distribute_setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'distribute_setup.py') 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() -- cgit v1.2.3