Revert "Fix venv creation in Python environments"

This commit reverts all python changes from 234bb31f61.
This commit is contained in:
Sandro Jäckel
2024-04-11 08:26:39 -07:00
committed by Jonathan Ringer
parent 636edfdeb1
commit b3b12c2d08
8 changed files with 71 additions and 75 deletions
@@ -318,6 +318,8 @@ in with passthru; stdenv.mkDerivation ({
inherit passthru;
postFixup = ''
# Include a sitecustomize.py file. Note it causes an error when it's in postInstall with 2.7.
cp ${../../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
'' + lib.optionalString strip2to3 ''
rm -R $out/bin/2to3 $out/lib/python*/lib2to3
'' + lib.optionalString stripConfig ''
@@ -537,7 +537,8 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
# Strip tests
rm -R $out/lib/python*/test $out/lib/python*/**/test{,s}
'' + optionalString includeSiteCustomize ''
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
'' + optionalString stripBytecode ''
# Determinism: deterministic bytecode
# First we delete all old bytecode.