mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Fix ansible-test python and pip executable search.
This commit is contained in:
parent
dd37857884
commit
a8487feb70
14 changed files with 81 additions and 75 deletions
|
@ -18,6 +18,7 @@ from lib.util import (
|
|||
intercept_command,
|
||||
remove_tree,
|
||||
display,
|
||||
find_python,
|
||||
)
|
||||
|
||||
from lib.ansible_util import (
|
||||
|
@ -66,7 +67,7 @@ class ImportTest(SanityMultipleVersion):
|
|||
|
||||
remove_tree(virtual_environment_path)
|
||||
|
||||
cmd = ['virtualenv', virtual_environment_path, '--python', 'python%s' % python_version, '--no-setuptools', '--no-wheel']
|
||||
cmd = ['virtualenv', virtual_environment_path, '--python', find_python(python_version), '--no-setuptools', '--no-wheel']
|
||||
|
||||
if not args.coverage:
|
||||
cmd.append('--no-pip')
|
||||
|
@ -84,8 +85,8 @@ class ImportTest(SanityMultipleVersion):
|
|||
|
||||
# make sure coverage is available in the virtual environment if needed
|
||||
if args.coverage:
|
||||
run_command(args, generate_pip_install('pip', 'sanity.import', packages=['setuptools']), env=env)
|
||||
run_command(args, generate_pip_install('pip', 'sanity.import', packages=['coverage']), env=env)
|
||||
run_command(args, generate_pip_install(['pip'], 'sanity.import', packages=['setuptools']), env=env)
|
||||
run_command(args, generate_pip_install(['pip'], 'sanity.import', packages=['coverage']), env=env)
|
||||
run_command(args, ['pip', 'uninstall', '--disable-pip-version-check', '-y', 'setuptools'], env=env)
|
||||
run_command(args, ['pip', 'uninstall', '--disable-pip-version-check', '-y', 'pip'], env=env)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue