aboutsummaryrefslogtreecommitdiffstats
path: root/distribute_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'distribute_setup.py')
-rw-r--r--distribute_setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/distribute_setup.py b/distribute_setup.py
index a2a06664..411c9c8c 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -144,6 +144,15 @@ 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:
+ pass
+
if not hasattr(pkg_resources, '_distribute'):
if not no_fake:
_fake_setuptools()