summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2019-03-15 12:00:26 -0700
committerTobias Henkel <tobias.henkel@bmw.de>2019-03-16 11:07:58 +0100
commit51a0635f684e3375e0ea63f7c35b283af6b43fa8 (patch)
tree9aa15857b0c867030931d7d089112acdf19e9d30
parentd5ea9cdd69562930c57a678f7fccf104ee79b35a (diff)
downloadzuul-51a0635f684e3375e0ea63f7c35b283af6b43fa8.tar.gz
Install virtualenv from source
Don't use system virtualenv. Install it from source/pypi. Change-Id: Idea7291cb6bff9d23c87fd40b3bb45f32115b7ef
-rw-r--r--bindep.txt3
-rw-r--r--requirements.txt1
-rw-r--r--zuul/lib/ansible.py3
3 files changed, 3 insertions, 4 deletions
diff --git a/bindep.txt b/bindep.txt
index b63dcdc20..0a5545fff 100644
--- a/bindep.txt
+++ b/bindep.txt
@@ -30,9 +30,6 @@ libffi6 [platform:dpkg]
libffi-devel [compile test platform:rpm]
python3-dev [compile test platform:dpkg platform:apk]
python3-devel [compile test platform:rpm]
-python-virtualenv [platform:dpkg]
-python3-virtualenv [platform:rpm]
-py3-virtualenv [compile test platform:apk]
bubblewrap [!platform:ubuntu-xenial]
libre2-dev [compile test platform:dpkg]
libre2-4 [platform:ubuntu-bionic]
diff --git a/requirements.txt b/requirements.txt
index d24072886..450b45b57 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
pbr>=1.1.0
+virtualenv
github3.py>=1.1.0
PyYAML>=3.1.0
diff --git a/zuul/lib/ansible.py b/zuul/lib/ansible.py
index 92c973807..8bc13cb27 100644
--- a/zuul/lib/ansible.py
+++ b/zuul/lib/ansible.py
@@ -92,7 +92,8 @@ class ManagedAnsible:
# We don't use directly the venv module here because its behavior is
# broken if we're already in a virtual environment.
- cmd = ['virtualenv', '-p', python_executable, venv_path]
+ cmd = [sys.executable, '-m', 'virtualenv',
+ '-p', python_executable, venv_path]
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if p.returncode != 0: