Merge pull request #297628 from cwp/python-env-venv

Fix venv creation in Python environments
This commit is contained in:
Domen Kožar
2024-03-22 19:17:13 +07:00
committed by GitHub
11 changed files with 132 additions and 72 deletions
@@ -537,8 +537,7 @@ 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.