include site in pythonpath of wrapped scripts, if python-site is installed
svn path=/nixpkgs/branches/stdenv-updates/; revision=32592
This commit is contained in:
@@ -12,6 +12,16 @@ 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 = {
|
||||
|
||||
13
pkgs/development/python-modules/site/pysite
Normal file
13
pkgs/development/python-modules/site/pysite
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user