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

Skip to content

.pth file not processed in editable install #50

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

Closed
chrisjbillington opened this issue May 31, 2020 · 2 comments
Closed

.pth file not processed in editable install #50

chrisjbillington opened this issue May 31, 2020 · 2 comments

Comments

@chrisjbillington
Copy link
Member

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.
@philipstarkey
Copy link
Member

Is this a duplicate of #43?

@chrisjbillington
Copy link
Member Author

It sure is!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants