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

Propagating PYTHONPATH in tests #146

Closed
tjni opened this issue Nov 21, 2022 · 2 comments · Fixed by #148
Closed

Propagating PYTHONPATH in tests #146

tjni opened this issue Nov 21, 2022 · 2 comments · Fixed by #148

Comments

@tjni
Copy link
Contributor

tjni commented Nov 21, 2022

I am working on running the test suite of this package in nixpkgs.

The nix package manager builds each Python package from source and installs it into its own location in a read-only directory instead of relying on a virtual environment and a wheel. To build an environment with dependencies in which a package can be built, we figure out where the dependencies are in the read-only directory and add them to PYTHONPATH.

Currently, a number of tests are failing because they spawn subprocesses which do not have PYTHONPATH passed along, so dependencies of pyperf such as psutil will not be found.

Would you accept a PR to inherit this environment variable in tests, or do you have other suggestions?

@vstinner
Copy link
Member

@corona10 @pablogsal: I'm fine with inheriting PYTHONPATH by default, or even consider inheriting all environment variables by default. What do you think?

@corona10
Copy link
Member

@corona10 @pablogsal: I'm fine with inheriting PYTHONPATH by default, or even consider inheriting all environment variables by default. What do you think?

I can not expect the side effect, so looks good to go.

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

Successfully merging a pull request may close this issue.

3 participants