Merge branch 'py/pth-create' into python-merge
Conflicts: pkgs/development/python-modules/generic/default.nix
This commit is contained in:
commit
dce76a387d
@ -20,20 +20,6 @@
|
|||||||
, installCommand ?
|
, installCommand ?
|
||||||
''
|
''
|
||||||
easy_install --always-unzip --prefix="$out" .
|
easy_install --always-unzip --prefix="$out" .
|
||||||
|
|
||||||
# A pth file might have been generated to load the package from
|
|
||||||
# within its own site-packages, rename this package not to
|
|
||||||
# collide with others.
|
|
||||||
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
|
|
||||||
if [ -e "$eapth" ]; then
|
|
||||||
# move colliding easy_install.pth to specifically named one
|
|
||||||
mv "$eapth" $(dirname "$eapth")/${name}.pth
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove any site.py files generated by easy_install as these
|
|
||||||
# cause collisions. If pth files are to be processed a
|
|
||||||
# corresponding site.py needs to be included in the PYTHONPATH.
|
|
||||||
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
|
|
||||||
''
|
''
|
||||||
|
|
||||||
, buildPhase ? "true"
|
, buildPhase ? "true"
|
||||||
@ -70,6 +56,20 @@ python.stdenv.mkDerivation (attrs // {
|
|||||||
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
|
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
|
||||||
${installCommand}
|
${installCommand}
|
||||||
|
|
||||||
|
# A pth file might have been generated to load the package from
|
||||||
|
# within its own site-packages, rename this package not to
|
||||||
|
# collide with others.
|
||||||
|
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
|
||||||
|
if [ -e "$eapth" ]; then
|
||||||
|
# move colliding easy_install.pth to specifically named one
|
||||||
|
mv "$eapth" $(dirname "$eapth")/${name}.pth
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove any site.py files generated by easy_install as these
|
||||||
|
# cause collisions. If pth files are to be processed a
|
||||||
|
# corresponding site.py needs to be included in the PYTHONPATH.
|
||||||
|
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
|
||||||
|
|
||||||
${postInstall}
|
${postInstall}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user