Fix ansible-test python and pip executable search.

This commit is contained in:
Matt Clay 2018-03-14 11:35:59 -07:00
parent dd37857884
commit a8487feb70
14 changed files with 81 additions and 75 deletions

View file

@ -9,6 +9,8 @@ from lib.util import (
CommonConfig,
is_shippable,
docker_qualify_image,
find_python,
generate_pip_command,
)
from lib.metadata import (
@ -67,6 +69,20 @@ class EnvironmentConfig(CommonConfig):
if self.delegate:
self.requirements = True
@property
def python_executable(self):
"""
:rtype: str
"""
return find_python(self.python_version)
@property
def pip_command(self):
"""
:rtype: list[str]
"""
return generate_pip_command(self.python_executable)
class TestConfig(EnvironmentConfig):
"""Configuration common to all test commands."""