Merge "Upgrade pip and setuptools in the mirror venv"
This commit is contained in:
@@ -160,6 +160,8 @@ class Mirror(object):
|
|||||||
pip_format = ("%s install -M -U %s --exists-action=w "
|
pip_format = ("%s install -M -U %s --exists-action=w "
|
||||||
"--download-cache=%s --build %s -r %s")
|
"--download-cache=%s --build %s -r %s")
|
||||||
venv_format = ("virtualenv --clear --extra-search-dir=%s %s")
|
venv_format = ("virtualenv --clear --extra-search-dir=%s %s")
|
||||||
|
upgrade_format = ("%s install -U --exists-action=w "
|
||||||
|
"--download-cache=%s --build %s %s")
|
||||||
|
|
||||||
workdir = tempfile.mkdtemp()
|
workdir = tempfile.mkdtemp()
|
||||||
reqs = os.path.join(workdir, "reqs")
|
reqs = os.path.join(workdir, "reqs")
|
||||||
@@ -214,6 +216,12 @@ class Mirror(object):
|
|||||||
if reqlist:
|
if reqlist:
|
||||||
out = self.run_command(venv_format %
|
out = self.run_command(venv_format %
|
||||||
(pip_cache_dir, venv))
|
(pip_cache_dir, venv))
|
||||||
|
out = self.run_command(upgrade_format %
|
||||||
|
(pip, pip_cache_dir,
|
||||||
|
build, "setuptools"))
|
||||||
|
out = self.run_command(upgrade_format %
|
||||||
|
(pip, pip_cache_dir,
|
||||||
|
build, "pip"))
|
||||||
if os.path.exists(build):
|
if os.path.exists(build):
|
||||||
shutil.rmtree(build)
|
shutil.rmtree(build)
|
||||||
new_reqs = self.process_http_requirements(reqlist,
|
new_reqs = self.process_http_requirements(reqlist,
|
||||||
|
|||||||
Reference in New Issue
Block a user