mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
Revert "include site in pythonpath of wrapped scripts, if python-site is installed"
This reverts commit 1ac12b0d4b64936104cb6031b02c92c3d1845ae5. svn path=/nixpkgs/branches/stdenv-updates/; revision=32654
This commit is contained in:
parent
bf1fe3aa09
commit
2d2c8b3e59
@ -15,14 +15,6 @@ wrapPythonProgramsIn() {
|
||||
_addToPythonPath $i
|
||||
done
|
||||
|
||||
program_PYTHONPATH='$(
|
||||
# activate site if installed
|
||||
bindir=$(dirname "$0")
|
||||
pysite="$bindir/pysite"
|
||||
relpath=$(test -x "$pysite" && "$pysite" path)
|
||||
echo -n ${relpath:+"$relpath":}
|
||||
)'"$program_PYTHONPATH"
|
||||
|
||||
for i in $(find "$dir" -type f -perm +0100); do
|
||||
|
||||
# Rewrite "#! .../env python" to "#! /nix/store/.../python".
|
||||
@ -33,7 +25,7 @@ wrapPythonProgramsIn() {
|
||||
if head -n1 "$i" | grep -q /python; then
|
||||
echo "wrapping \`$i'..."
|
||||
wrapProgram "$i" \
|
||||
--prefix PYTHONPATH ":" "$program_PYTHONPATH" \
|
||||
--prefix PYTHONPATH ":" $program_PYTHONPATH \
|
||||
--prefix PATH ":" $program_PATH
|
||||
fi
|
||||
done
|
||||
|
@ -12,16 +12,6 @@ stdenv.mkDerivation rec {
|
||||
dst=$out/lib/${python.libPrefix}/site-packages
|
||||
mkdir -p $dst
|
||||
cat ${./site.py} >> $dst/site.py
|
||||
|
||||
# by providing content for bin/ we make sure, that python or
|
||||
# some other script is linked instead of the bin/ directory
|
||||
# itself. This is needed for the wrappers to make all site
|
||||
# packages available if site is installed.
|
||||
mkdir $out/bin
|
||||
cat ${./pysite} >> $out/bin/pysite
|
||||
substituteInPlace $out/bin/pysite \
|
||||
--replace PYTHON_LIB_PREFIX ${python.libPrefix}
|
||||
chmod +x $out/bin/pysite
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
python=PYTHON_LIB_PREFIX
|
||||
|
||||
case "$1" in
|
||||
path)
|
||||
echo $(dirname $0)/../lib/$python/site-packages
|
||||
;;
|
||||
*)
|
||||
echo Usage:
|
||||
echo " $(basename $0) path"
|
||||
exit 1
|
||||
esac
|
Loading…
Reference in New Issue
Block a user