diff options
author | PJ Eby <distutils-sig@python.org> | 2006-02-07 16:43:41 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2006-02-07 16:43:41 +0000 |
commit | 49af43f047847e66c0725cb4f2ba69be4894e06e (patch) | |
tree | 5f9b41a03b6a284fa3b4a9f449f547846c982890 /setuptools/command/easy_install.py | |
parent | 57e12dd62066d580c2d015c69340c606744871ed (diff) | |
download | python-setuptools-bitbucket-49af43f047847e66c0725cb4f2ba69be4894e06e.tar.gz |
The ``--always-copy`` option now skips "system" and "development" eggs
since they can't be reliably copied. Note that this may cause EasyInstall
to choose an older version of a package than what you expected, or it may
cause downloading and installation of a fresh version of what's already
installed.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 71fe46bb..31975f63 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -305,27 +305,27 @@ class easy_install(Command): spec = parse_requirement_arg(spec) self.check_editable(spec) - download = self.package_index.fetch( - spec, tmpdir, self.upgrade, self.editable + dist = self.package_index.fetch_distribution( + spec, tmpdir, self.upgrade, self.editable, not self.always_copy ) - if download is None: - raise DistutilsError( - "Could not find distribution for %r" % spec - ) - - return self.install_item(spec, download, tmpdir, deps) + if dist is None: + msg = "Could not find suitable distribution for %r" % spec + if self.always_copy: + msg+=" (--always-copy skips system and development eggs)" + raise DistutilsError(msg) + elif dist.precedence==DEVELOP_DIST: + # .egg-info dists don't need installing, just process deps + self.process_distribution(spec, dist, deps, "Using") + return dist + else: + return self.install_item(spec, dist.location, tmpdir, deps) finally: if os.path.exists(tmpdir): rmtree(tmpdir) - - - - - def install_item(self, spec, download, tmpdir, deps, install_needed=False): # Installation is also needed if file in tmpdir or is not an egg |