Simplify virtualenv install and execution
virtualenv==20.0.0 introduced new symlinking of "seed" packages that broke within a bwrap context. We fixed this by forcing those seed packages to be installed by pip avoiding any symlinking. Since then upstream virtualenv has realize this was bad default behavior and virtualenv==20.0.2 does not symlink by default. Take advantage of this and exclude 20.0.0 and 20.0.1 as they need special handling. This allows other versions (new and old) to function. Change-Id: I3b993e72b52e2234e046a657280b008887c535a3
This commit is contained in:
parent
9360224e0f
commit
7c6503aba0
|
@ -1,6 +1,6 @@
|
||||||
pbr>=1.1.0
|
pbr>=1.1.0
|
||||||
# Newer virtualenv has different behavior and arguments
|
# Early virtualenv 20 had bad file location assumptions
|
||||||
virtualenv>=20.0.0
|
virtualenv!=20.0.0,!=20.0.1
|
||||||
|
|
||||||
github3.py>=1.1.0
|
github3.py>=1.1.0
|
||||||
PyYAML>=3.1.0
|
PyYAML>=3.1.0
|
||||||
|
|
|
@ -94,7 +94,7 @@ class ManagedAnsible:
|
||||||
# We don't use directly the venv module here because its behavior is
|
# We don't use directly the venv module here because its behavior is
|
||||||
# broken if we're already in a virtual environment.
|
# broken if we're already in a virtual environment.
|
||||||
cmd = [sys.executable, '-m', 'virtualenv',
|
cmd = [sys.executable, '-m', 'virtualenv',
|
||||||
'-p', python_executable, '--seeder=pip', venv_path]
|
'-p', python_executable, venv_path]
|
||||||
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
|
|
Loading…
Reference in New Issue