wrap-python: fix pypy site-packages path

This commit is contained in:
Jörg Thalheim 2018-12-20 14:03:23 +00:00
parent cc30e48624
commit 855777ad22
2 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ with lib;
makeSetupHook {
deps = makeWrapper;
substitutions.libPrefix = python.libPrefix;
substitutions.sitePackages = python.sitePackages;
substitutions.executable = python.interpreter;
substitutions.python = python;
substitutions.magicalSedExpression = let

View File

@ -92,7 +92,7 @@ _addToPythonPath() {
pythonPathsSeen[$dir]=1
# addToSearchPath is defined in stdenv/generic/setup.sh. It will have
# the effect of calling `export program_X=$dir/...:$program_X`.
addToSearchPath program_PYTHONPATH $dir/lib/@libPrefix@/site-packages
addToSearchPath program_PYTHONPATH $dir/@sitePackages@
addToSearchPath program_PATH $dir/bin
# Inspect the propagated inputs (if they exist) and recur on them.
@ -113,9 +113,9 @@ createBuildInputsPth() {
if $(echo -n $x |grep -q python-recursive-pth-loader); then
continue
fi
if test -d "$x"/lib/@libPrefix@/site-packages; then
echo $x/lib/@libPrefix@/site-packages \
>> "$out"/lib/@libPrefix@/site-packages/${name}-nix-python-$category.pth
if test -d "$x"/@sitePackages@; then
echo $x/@sitePackages@ \
>> "$out"/@sitePackages@/${name}-nix-python-$category.pth
fi
done
fi