nixpkgs/pkgs/build-support
Colin Putney 234bb31f61
Fix venv creation in Python environments
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.
2024-03-21 19:26:57 -06:00
..
add-driver-runpath
add-opengl-runpath
agda
alternatives treewide: simplify exec format conditionals 2024-01-07 17:43:33 -08:00
appimage appimage-run: Add pipewire support 2024-02-18 22:34:27 +01:00
binary-cache
bintools-wrapper Revert "avrlibc: hook up libdir for cc-wrapper" 2024-03-14 20:09:11 +01:00
build-bazel-package
build-fhsenv-bubblewrap Merge pull request #277494 from trofi/buildFHSEnv-fix-eval 2024-02-22 21:00:19 +01:00
build-fhsenv-chroot build-fhs-user-env: add compatibility for pipewire alsa emulation 2024-02-02 22:38:49 -08:00
build-graalvm-native-image buildGraalvmNativeImage: fix UTF-8 encoding issue for JVM dependencies 2024-01-26 11:12:54 +00:00
buildenv build-support/buildenv: Hoist builder instantiation 2023-12-29 03:04:46 +13:00
cc-wrapper Merge remote-tracking branch 'upstream/master' into staging-next 2024-03-17 07:18:11 +00:00
coq
dart dartHooks.dartInstallHook: Add trailing newline 2024-01-18 12:17:43 +11:00
deterministic-uname
dhall
docker Merge pull request #292259 from dawidd6/docker-nix-ssl 2024-03-12 02:01:08 +01:00
dotnet nuget-to-nix: fix error handling 2024-03-06 10:14:21 -04:00
emacs Merge branch 'master' into staging-next 2023-12-31 02:31:32 +01:00
expand-response-params
fake-nss
fetch9front
fetchbitbucket
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchdebianpatch
fetchdocker
fetchfirefoxaddon
fetchfossil
fetchgit
fetchgitea
fetchgithub fetchFromGitHub: fix compatibility issue with nix-prefetch 2024-01-30 12:21:13 +01:00
fetchgitiles
fetchgitlab Merge pull request #268304 from panicgh/fetchgitlab-sparse-forcegit 2023-12-17 03:34:52 +01:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs
fetchmavenartifact
fetchmtn
fetchnextcloudapp
fetchpatch
fetchpijul
fetchpypi
fetchpypilegacy fetchPypiLegacy: add test 2024-02-17 17:11:59 +13:00
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah
fetchsourcehut
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchtorrent
fetchurl
fetchzip fetchzip: allow dropping unzip 2024-01-12 20:26:16 +01:00
flutter buildFlutterApplication: Change flutterHostPlatform to targetFlutterPlatform 2024-01-19 11:07:33 +11:00
go Merge pull request #276685 from katexochen/buildGoModule/buildid 2024-01-14 14:13:16 +01:00
icon-conv-tools
install-shell-files
java
kernel Merge pull request #283770 from r-ryantm/auto-update/makeInitrdNGTool 2024-02-10 22:19:21 -05:00
lib make-derivation.nix: Split makeDerivationArgument, mkDerivation with duplicate functionality 2024-03-12 18:16:56 +01:00
libredirect libredirect: don't test LFS64 functions on musl 2024-03-02 01:02:36 +01:00
make-darwin-bundle
make-desktopitem
make-hardcode-gsettings-patch
make-pkgconfigitem
make-startupitem
mkshell
mono-dll-fixer
nix-gitignore
node npmHooks.npmInstallHook: ignore bundle deps when calculating files to install 2024-03-14 14:04:51 +01:00
nuke-references nuke-references: add meta.mainProgram 2024-01-05 15:04:14 -05:00
ocaml
oci-tools ociTools: Fix invalid cgroup mount option 2023-12-27 19:41:07 +01:00
php build-support/php: update warnings when composer validate fails 2024-03-14 21:52:08 +01:00
pkg-config-wrapper
portable-service
prefer-remote-fetch
references-by-popularity
release
remove-references-to
replace-secret
rust wrapRustc: wrap rustdoc 2024-03-02 13:09:07 +01:00
setup-hooks Fix venv creation in Python environments 2024-03-21 19:26:57 -06:00
singularity-tools
src-only
substitute substitute: Deprecate replacements, introduce replacementsList 2024-02-29 00:35:27 +01:00
substitute-files
testers macOS support for NixOS tests (#282401) 2024-03-02 06:33:14 +01:00
trivial-builders trivial-builders: Deduplicate docs 2024-03-11 11:33:14 +01:00
vm
wrapper-common
writers Merge remote-tracking branch 'upstream/staging-next' into staging 2024-03-16 00:07:22 +00:00
build-maven.nix
checkpoint-build.nix doc: polish the docs of checkpointBuildTools 2024-01-09 01:34:21 +08:00
closure-info.nix
make-impure-test.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix