-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Python 3 when calling pip for extra E2E start up commands #4213
Conversation
@@ -79,6 +79,9 @@ def agent_command(self): | |||
return get_agent_exe(self.agent_version, platform=self.platform) | |||
|
|||
def exec_command(self, command, **kwargs): | |||
if command.startswith('pip '): | |||
command = command.replace('pip ', get_pip_exe(self.python_version, self.platform), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should fix get_pip_exe for MAC, otherwise it won't work for the majority of us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exec_command is to run commands in docker not on the local machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well no this is local environment support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, there is another exec_command in docker.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, for local environment should it use the tox pip rather than the agent pip? In that case its going to be already the right version or at most replace it with python -m pip
@@ -79,6 +79,9 @@ def exec_command(self, command, **kwargs): | |||
if kwargs.pop('interactive', False): | |||
cmd += ' -it' | |||
|
|||
if command.startswith('pip '): | |||
command = command.replace('pip ', get_pip_exe(self.python_version), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this working? you cannot replace a string with a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command
is a string, see line 86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but get_pip_exe(self.python_version) returns an array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks! #4225
Motivation
A few integrations, like ibm_db2