diff --git a/bindep.txt b/bindep.txt index b63dcdc207..0a5545fff5 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 d24072886d..450b45b572 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 92c9738072..8bc13cb27f 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: