Commit 63cf3a6b authored by Jim Fulton's avatar Jim Fulton

Use separate controll for picking versions

Mainly to disable it when just trying to get distributions for
buildout and setuptools.
parent 3bdc89f1
......@@ -188,7 +188,8 @@ class Installer:
newest=True,
versions=None,
use_dependency_links=None,
allow_hosts=('*',)
allow_hosts=('*',),
check_picked=True,
):
assert executable == sys.executable, (executable, sys.executable)
self._dest = dest
......@@ -218,6 +219,7 @@ class Installer:
self._env = pkg_resources.Environment(path)
self._index = _get_index(index, links, self._allow_hosts)
self._requirements_and_constraints = []
self._check_picked = check_picked
if versions is not None:
self._versions = normalize_versions(versions)
......@@ -558,7 +560,7 @@ class Installer:
self._links,
self._allow_hosts)
if self._dest is not None:
if self._check_picked:
# Check whether we picked a version and, if we did, report it:
for dist in dists:
if not (
......@@ -877,6 +879,7 @@ def install(specs, dest,
use_dependency_links=None, allow_hosts=('*',),
include_site_packages=None,
allowed_eggs_from_site_packages=None,
check_picked=True,
):
assert executable == sys.executable, (executable, sys.executable)
assert include_site_packages is None
......@@ -885,14 +888,16 @@ def install(specs, dest,
installer = Installer(dest, links, index, sys.executable,
always_unzip, path,
newest, versions, use_dependency_links,
allow_hosts=allow_hosts)
allow_hosts=allow_hosts,
check_picked=check_picked)
return installer.install(specs, working_set)
buildout_and_setuptools_dists = list(install(['zc.buildout'], None))
buildout_and_setuptools_dists = list(install(['zc.buildout'], None,
check_picked=False))
buildout_and_setuptools_path = [d.location
for d in buildout_and_setuptools_dists]
setuptools_path = [d.location
for d in install(['setuptools'], None)]
for d in install(['setuptools'], None, check_picked=False)]
setuptools_pythonpath = os.pathsep.join(setuptools_path)
def build(spec, dest, build_ext,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment