<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nixos/nixpkgs.git/pkgs/development/interpreters/python/tests/test_environments, branch master</title>
<subtitle>Nix Packages collection</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/'/>
<entry>
<title>python: fix nixenv test</title>
<updated>2025-10-31T01:08:04+00:00</updated>
<author>
<name>qbisi</name>
<email>qbisicwate@gmail.com</email>
</author>
<published>2025-10-31T01:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=14fe4b34deba94cfc51f1f35546c67754c19cb56'/>
<id>14fe4b34deba94cfc51f1f35546c67754c19cb56</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>python3: fix passthru tests after b937eac</title>
<updated>2025-07-22T22:52:19+00:00</updated>
<author>
<name>Martin Weinelt</name>
<email>hexa@darmstadt.ccc.de</email>
</author>
<published>2025-07-22T22:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=08aed995eaf3f3c9b3ab729cee2a0c1a33db97af'/>
<id>08aed995eaf3f3c9b3ab729cee2a0c1a33db97af</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Fix venv creation in Python environments"</title>
<updated>2024-04-11T15:26:39+00:00</updated>
<author>
<name>Sandro Jäckel</name>
<email>sandro.jaeckel@gmail.com</email>
</author>
<published>2024-04-07T16:54:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=b3b12c2d08e2f5aab1c6f6ae0021ea11a6825b14'/>
<id>b3b12c2d08e2f5aab1c6f6ae0021ea11a6825b14</id>
<content type='text'>
This commit reverts all python changes from 234bb31f611f43f8b744b305ab82035de637aaca.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit reverts all python changes from 234bb31f611f43f8b744b305ab82035de637aaca.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix venv creation in Python environments</title>
<updated>2024-03-22T01:26:57+00:00</updated>
<author>
<name>Colin Putney</name>
<email>colin.putney@vannevarlabs.com</email>
</author>
<published>2024-03-22T01:22:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=234bb31f611f43f8b744b305ab82035de637aaca'/>
<id>234bb31f611f43f8b744b305ab82035de637aaca</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>python.tests: don't mix the two types of tests</title>
<updated>2020-08-30T10:59:24+00:00</updated>
<author>
<name>Frederik Rietdijk</name>
<email>fridh@fridh.nl</email>
</author>
<published>2020-08-30T10:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=5d8dd5c2598a74761411bc9bef7c9111d43d2429'/>
<id>5d8dd5c2598a74761411bc9bef7c9111d43d2429</id>
<content type='text'>
The integration tests code was included in the environment tests. After
this commit it is hopefully clearer what belongs together.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The integration tests code was included in the environment tests. After
this commit it is hopefully clearer what belongs together.
</pre>
</div>
</content>
</entry>
</feed>
