aboutsummaryrefslogtreecommitdiffstats
path: root/distribute_setup.py
diff options
context:
space:
mode:
authorDaniel Stutzbach <daniel@stutzbachenterprises.com>2009-10-19 08:43:45 -0500
committerDaniel Stutzbach <daniel@stutzbachenterprises.com>2009-10-19 08:43:45 -0500
commit7572da337f94c328f00100dc55f494c9d811f4bd (patch)
tree70dbc2a3ac69c1322ae5b0da64a7ffb550dc4c56 /distribute_setup.py
parent39be786e197fd135dac23a9102d257877985ebf0 (diff)
parentfe015037cc3ff5c0061bd2f427775ad665bda61c (diff)
downloadexternal_python_setuptools-7572da337f94c328f00100dc55f494c9d811f4bd.tar.gz
external_python_setuptools-7572da337f94c328f00100dc55f494c9d811f4bd.tar.bz2
external_python_setuptools-7572da337f94c328f00100dc55f494c9d811f4bd.zip
Merged bugfixes from the danielstutzbach fork
--HG-- branch : distribute extra : rebase_source : cce25468ec8f18af01e99af60cdaaf0fb4a72ee9
Diffstat (limited to 'distribute_setup.py')
-rw-r--r--distribute_setup.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/distribute_setup.py b/distribute_setup.py
index db75a3c6..de7b1f6d 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -125,7 +125,7 @@ def _do_download(version, download_base, to_dir, download_delay):
def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=os.curdir, download_delay=15, no_fake=False):
+ to_dir=os.curdir, download_delay=15, no_fake=True):
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
was_imported = 'pkg_resources' in sys.modules or \
@@ -135,7 +135,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
if not no_fake:
- fake_setuptools()
+ _fake_setuptools()
raise ImportError
except ImportError:
return _do_download(version, download_base, to_dir, download_delay)
@@ -160,7 +160,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
return _do_download(version, download_base, to_dir,
download_delay)
finally:
- _create_fake_setuptools_pkg_info(to_dir)
+ if not no_fake:
+ _create_fake_setuptools_pkg_info(to_dir)
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, delay=15):
@@ -320,7 +321,7 @@ def _patch_egg_dir(path):
def _before_install():
log.warn('Before install bootstrap.')
- fake_setuptools()
+ _fake_setuptools()
def _under_prefix(location):
@@ -341,7 +342,7 @@ def _under_prefix(location):
return True
-def fake_setuptools():
+def _fake_setuptools():
log.warn('Scanning installed packages')
try:
import pkg_resources