summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xEasyInstall.txt3
-rwxr-xr-xez_setup.py14
-rwxr-xr-xsetuptools.txt5
3 files changed, 15 insertions, 7 deletions
diff --git a/EasyInstall.txt b/EasyInstall.txt
index 8ebe5cf1..857d3827 100755
--- a/EasyInstall.txt
+++ b/EasyInstall.txt
@@ -1194,6 +1194,9 @@ Release Notes/Change History
* Windows script wrappers now support quoted arguments and arguments
containing spaces. (Patch contributed by Jim Fulton.)
+ * The ``ez_setup.py`` script now actually works when you put a setuptools
+ ``.egg`` alongside it for bootstrapping an offline machine.
+
0.6c1
* EasyInstall now includes setuptools version information in the
``User-Agent`` string sent to websites it visits.
diff --git a/ez_setup.py b/ez_setup.py
index adf4eeec..e58c6f6b 100755
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -77,13 +77,13 @@ def use_setuptools(
try:
pkg_resources.require("setuptools>="+version)
- except pkg_resources.VersionConflict:
+ except pkg_resources.VersionConflict, e:
# XXX could we install in a subprocess here?
print >>sys.stderr, (
"The required version of setuptools (>=%s) is not available, and\n"
"can't be installed while this script is running. Please install\n"
- " a more recent version first."
- ) % version
+ " a more recent version first.\n\n(Currently using %r)"
+ ) % (version, e.args[0])
sys.exit(2)
def download_setuptools(
@@ -139,15 +139,15 @@ def main(argv, version=DEFAULT_VERSION):
try:
import setuptools
except ImportError:
- import tempfile, shutil
- tmpdir = tempfile.mkdtemp(prefix="easy_install-")
+ egg = None
try:
- egg = download_setuptools(version, to_dir=tmpdir, delay=0)
+ egg = download_setuptools(version, delay=0)
sys.path.insert(0,egg)
from setuptools.command.easy_install import main
return main(list(argv)+[egg]) # we're done here
finally:
- shutil.rmtree(tmpdir)
+ if egg and os.path.exists(egg):
+ os.unlink(egg)
else:
if setuptools.__version__ == '0.0.1':
# tell the user to uninstall obsolete version
diff --git a/setuptools.txt b/setuptools.txt
index 7cfc3815..42e81d32 100755
--- a/setuptools.txt
+++ b/setuptools.txt
@@ -2563,6 +2563,11 @@ XXX
Release Notes/Change History
----------------------------
+0.6c2
+ * The ``ez_setup`` module displays the conflicting version of setuptools (and
+ its installation location) when a script requests a version that's not
+ available.
+
0.6c1
* Fixed ``AttributeError`` when trying to download a ``setup_requires``
dependency when a distribution lacks a ``dependency_links`` setting.