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

Please make test_examples.py use venv #109

Open
mgorny opened this issue Jul 28, 2024 · 3 comments
Open

Please make test_examples.py use venv #109

mgorny opened this issue Jul 28, 2024 · 3 comments

Comments

@mgorny
Copy link

mgorny commented Jul 28, 2024

The tests in test_examples.py currently install straight into the parent environment. Unfortunately, this means that in the best case the examples are left installed, and in the worst the tests cannot be run because pip is set not to allow installing packages into the build environment (the error: externally-managed-environment):

$ pip list | grep example
example_hatchling  24.7.0
example_noop       100
example_setuppy    1.2.3
example_setuptools 2.3.4

Could you please make the tests use a dedicated venv (set up with system_site_packages=True and symlinks=True) for every test case?

@twm
Copy link
Contributor

twm commented Jul 28, 2024

That sounds possible... I've already taken a step in that direction in #107 by isolating the package builds.

Why is it important that the venv be created with system_site_packages=True?

@mgorny
Copy link
Author

mgorny commented Jul 28, 2024

I presumed you need some of the dependencies there, though perhaps you don't. Then I guess it's mostly a matter whether you want venv to install pip from the Python bundle or use system pip.

@mgorny
Copy link
Author

mgorny commented Jul 28, 2024

Ah, also please note that we actually need the tests to work fully offline, as all Gentoo builds are isolated from the Internet for security reasons.

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

2 participants