summaryrefslogtreecommitdiff
path: root/pkgs/development/interpreters/python/tests/test_environments
AgeCommit message (Collapse)Author
2025-10-31python: fix nixenv testqbisi
2025-07-23python3: fix passthru tests after b937eacMartin Weinelt
2024-04-11Revert "Fix venv creation in Python environments"Sandro Jäckel
This commit reverts all python changes from 234bb31f611f43f8b744b305ab82035de637aaca.
2024-03-21Fix venv creation in Python environmentsColin Putney
The way we build python environments is subtly broken. A python environment should be semantically identical to a vanilla Python installation in, say, /usr/local. The current implementation, however, differs in two important ways. The first is that it's impossible to use python packages from the environment in python virtual environments. The second is that the nix-generated environment appears to be a venv, but it's not. This commit changes the way python environments are built: * When generating wrappers for python executables, we inherit argv[0] from the wrapper. This causes python to initialize its configuration in the environment with all the correct paths. * We remove the sitecustomize.py file from the base python package. This file was used tweak the python configuration after it was incorrectly initialized. That's no longer necessary. The end result is that python environments no longer appear to be venvs, and behave more like a vanilla python installation. In addition it's possible to create a venv using an environment and use packages from both the environment and the venv.
2020-08-30python.tests: don't mix the two types of testsFrederik Rietdijk
The integration tests code was included in the environment tests. After this commit it is hopefully clearer what belongs together.