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

don't attempt to "correct" PYTHONPATH configuration for subprocesses unless asked #33

Open
glyph opened this issue Feb 8, 2020 · 2 comments

Comments

@glyph
Copy link
Member

glyph commented Feb 8, 2020

When Ampoule was first written, it was common practice for applications to do weird, potentially non-replicable startup nonsense to get sys.path to be correct and include all of one's sources. Since virtualenv, venv, and pip have taken over the Python developer-setup space, it's much more likely that your Python's path and dependency configuration is correct if you just don't mess with it.

Setting PYTHONPATH to point at the standard dist dirs can also have weird and unintended side-effects. For example, any shadowing of stdlib modules (enum34, for example) might create inscrutable breakages when .pth files try to import things (like coverage).

#24 is another symptom of this monkeying around with sys.path.

Let's leave the environment untouched, and provide a hook to tweak it in the now-unusual case where something has broken.

@graingert
Copy link
Member

graingert commented Aug 7, 2020

@glyph there's already a hook - the user can pass env={"PYTHONPATH": ...}

@glyph
Copy link
Member Author

glyph commented Aug 7, 2020

@graingert fair enough! that does seem sufficient.

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