Closed
Description
In an editable install, labscript-suite.pth is not processed at interpreter startup because it is not in a site directory, even though it's in the python path.
This .pth file adds userlib and pythonlib (as defined in labconfig) to the python import path to make user code available for import from the python interpreter regardless of whether the code is running within a labscript suite program.
We could:
- Work out how to get it into a site directory during an editable install (possibly not reversible or otherwise a bit magic)
- Convince Python that .egg-link files should imply the target directory is a site directory to be processed by the site module, make a patch and wait for them to incorporate it
- Work out if there's some way to otherwise add our package directory as a site directory during editable install.
- Live with it and instead process the .pth file whenever
labscript_utils
is imported. This means user code would not be available for import in editable installs when not running inside a labscript suite program, unlesslabscript_utils
has been imported. This could simply be documented as a limitation of editable installs.
Metadata
Metadata
Assignees
Labels
No labels