Browse Source

Install virtualenv from source

Don't use system virtualenv. Install it from source/pypi.

Change-Id: Idea7291cb6bff9d23c87fd40b3bb45f32115b7ef
tags/3.7.0
Clark Boylan 6 months ago
parent
commit
51a0635f68
No account linked to committer's email address
3 changed files with 3 additions and 4 deletions
  1. 0
    3
      bindep.txt
  2. 1
    0
      requirements.txt
  3. 2
    1
      zuul/lib/ansible.py

+ 0
- 3
bindep.txt View File

@@ -30,9 +30,6 @@ libffi6 [platform:dpkg]
30 30
 libffi-devel [compile test platform:rpm]
31 31
 python3-dev [compile test platform:dpkg platform:apk]
32 32
 python3-devel [compile test platform:rpm]
33
-python-virtualenv [platform:dpkg]
34
-python3-virtualenv [platform:rpm]
35
-py3-virtualenv [compile test platform:apk]
36 33
 bubblewrap [!platform:ubuntu-xenial]
37 34
 libre2-dev [compile test platform:dpkg]
38 35
 libre2-4 [platform:ubuntu-bionic]

+ 1
- 0
requirements.txt View File

@@ -1,4 +1,5 @@
1 1
 pbr>=1.1.0
2
+virtualenv
2 3
 
3 4
 github3.py>=1.1.0
4 5
 PyYAML>=3.1.0

+ 2
- 1
zuul/lib/ansible.py View File

@@ -92,7 +92,8 @@ class ManagedAnsible:
92 92
 
93 93
         # We don't use directly the venv module here because its behavior is
94 94
         # broken if we're already in a virtual environment.
95
-        cmd = ['virtualenv', '-p', python_executable, venv_path]
95
+        cmd = [sys.executable, '-m', 'virtualenv',
96
+               '-p', python_executable, venv_path]
96 97
         p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
97 98
 
98 99
         if p.returncode != 0:

Loading…
Cancel
Save