diff options
author | Daniel Stutzbach <daniel@stutzbachenterprises.com> | 2009-10-17 22:03:24 -0500 |
---|---|---|
committer | Daniel Stutzbach <daniel@stutzbachenterprises.com> | 2009-10-17 22:03:24 -0500 |
commit | b1bd773feed63e4037a9dab96f40c3b147f9414e (patch) | |
tree | ba36f0570d92419b84e98078c92cd8f18c9ed108 /distribute_setup.py | |
parent | 032f6e8080b511c1f700e5d6133e7f68dbdbcf7d (diff) | |
download | external_python_setuptools-b1bd773feed63e4037a9dab96f40c3b147f9414e.tar.gz external_python_setuptools-b1bd773feed63e4037a9dab96f40c3b147f9414e.tar.bz2 external_python_setuptools-b1bd773feed63e4037a9dab96f40c3b147f9414e.zip |
Fixed build_egg to test for the existence of the correct egg filename.
--HG--
branch : distribute
extra : rebase_source : c944237f4b1aff19e3f6838b83945b7e4bff48de
Diffstat (limited to 'distribute_setup.py')
-rw-r--r-- | distribute_setup.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/distribute_setup.py b/distribute_setup.py index 0460619e..c91410cb 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -84,7 +84,7 @@ def _install(tarball): os.chdir(old_wd) -def _build_egg(tarball, to_dir): +def _build_egg(egg, tarball, to_dir): # extracting the tarball tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) @@ -105,11 +105,8 @@ def _build_egg(tarball, to_dir): _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result - for file in os.listdir(to_dir): - if fnmatch.fnmatch(file, 'distribute-%s*.egg' % DEFAULT_VERSION): - return os.path.join(to_dir, file) - - raise IOError('Could not build the egg.') + if not os.path.exists(egg): + raise IOError('Could not build the egg.') finally: os.chdir(old_wd) @@ -120,7 +117,7 @@ def _do_download(version, download_base, to_dir, download_delay): if not os.path.exists(egg): tarball = download_setuptools(version, download_base, to_dir, download_delay) - egg = _build_egg(tarball, to_dir) + _build_egg(egg, tarball, to_dir) sys.path.insert(0, egg) import setuptools setuptools.bootstrap_install_from = egg |