labgrid icon indicating copy to clipboard operation
labgrid copied to clipboard

agentwrapper: Allow specyfing Python executable

Open steelman opened this issue 1 month ago • 5 comments

Description

Enable users to choose which Python executable to use to run the agent by setting LG_AGENT_PYTHON environment variable. This is necessary when a remote labgrid runs in a virtual environment which provide packages, or their versions, not available in the system installation of Python.

Checklist

  • [x] Documentation for the feature
  • [ ] Tests for the feature
  • [x] PR has been tested
  • [x] Man pages have been regenerated

steelman avatar Nov 25 '25 11:11 steelman

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 45.1%. Comparing base (3fc3705) to head (5772c7e). :white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1782   +/-   ##
======================================
  Coverage    45.1%   45.1%           
======================================
  Files         172     172           
  Lines       13608   13609    +1     
======================================
+ Hits         6144    6145    +1     
  Misses       7464    7464           
Flag Coverage Δ
3.10 45.1% <100.0%> (+<0.1%) :arrow_up:
3.11 45.1% <100.0%> (+<0.1%) :arrow_up:
3.12 45.1% <100.0%> (+<0.1%) :arrow_up:
3.13 45.1% <100.0%> (+<0.1%) :arrow_up:
3.14 45.1% <100.0%> (+<0.1%) :arrow_up:
3.9 45.1% <100.0%> (+<0.1%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 25 '25 11:11 codecov[bot]

Doesn't this mean that the same path would be used for all exporters? When you have a diverse set of exporters, a fixed interpreter wouldn't work well.

jluebbe avatar Dec 02 '25 16:12 jluebbe

I haven't thought about connecting to many different exporters at once, indeed. In such case, I suppose, each exporter should advertise the interpreter it uses and clients need to discover it.

steelman avatar Dec 02 '25 18:12 steelman

For which dependencies do you need a virtualenv? We've tried to avoid complex dependencies, so (in our setups) installing the few needed dependencies using distro packages worked well. Especially for NetworkManager, you want to use the packages which match the libnm from the distro.

jluebbe avatar Dec 03 '25 08:12 jluebbe

I've got patches to introduce support for FTDI chips in bitbanging mode to control relays (which enables using 8 pins instead of 3-4 when controlled via Linux gpio driver). For this to work pyftdi needs to be patched as well. We figure the patches won't make it into Ubuntu anytime soon.

steelman avatar Dec 03 '25 11:12 steelman