agent: add argument to specify python virutal env #1418
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using agentwrapper, the python packages used are the one installed on the machine.
This commit add an argument to specify the path to a virtual env which will be used by the agent.
Description
Checklist
I have not seen documentation about
AgentWrapper
(git grep -i agentwrapper
did not yield any .rst)I would need help with that
Not applicable as far as I understand
Let me know if you think this is necessary, I think it is an advanced feature which might be confusing for first time readers.
Not applicable
I tested with our internal fork of labgrid which adds a driver to make https requests from the exporter to the DUT.
Not applicable
I developped this feature in order to be able to use the
urllib3
module pinned at a version (see #1301 (comment)).The driver using this feature is not (yet) public but a first version is available here:
SiemaApplications-attic@81918df
Here is the modification added to the above patch in order to be able to specify the virtual env necessary for
pyrequests
labgrid driver:Then the env yaml file use looks like this:
I tried to run developper test without success...
tox
would return an error and I did not know which env file to provide topytest
.I did not know if I should update all drivers using an instance of
AgentWrapper
in order to use this new feature. Just let me know.I feel a little bit embarrassed with this PR as I have not been able to test it and document it according to the development guidelines, my intent is not to burden you but rather to give something back to this project.
Thanks in advance for your guidance.