Skip to content
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

.pth status #443

Closed
Harut opened this issue Jul 26, 2014 · 2 comments
Closed

.pth status #443

Harut opened this issue Jul 26, 2014 · 2 comments

Comments

@Harut
Copy link

Harut commented Jul 26, 2014

  • pth in user or global site-packages seem to work OK. Therefore, as I can see, they are not covered by tests (and not obvious that they are actually required).
  • pth inside virtualenv's site-packages is broken. And tests are required.
  • Added support for pth files in site-packages. #345 solution seems to be broken in two points. First, only pth files from site-packages dirs should be included, but in that solution pth files from all sys.path entries are included. Second, in original site.py code there is probably (didn't check, makepath func) a workaround for windows case-insensitive paths (?).
  • I have some doubt about how it exactly should be implemented.
    • add pth parsing directly in sys.path? Looks hacky, but as soon as venv's site-packages is dealed in sam way, it should be ok.
    • I didn't investigate what is the correct place for these paths. Probably, after venv's site-packages dir.

Will fix it if have a time. Otherwise, hope my comments will help to fix it in future.

@davidhalter
Copy link
Owner

Awesome!

@davidhalter
Copy link
Owner

I think #636 fixes most issues with .pth files. Not every .pth file will work correctly, because import lines are ignored (intentionally to avoid code execution). Most of the time this will not be an issue, though.

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

No branches or pull requests

3 participants