Thanks to visit codestin.com
Credit goes to github.com

Skip to content

.pth file not processed in editable install #50

Closed
@chrisjbillington

Description

@chrisjbillington

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, unless labscript_utils has been imported. This could simply be documented as a limitation of editable installs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions