fix pypy and pypyPackages
This commit is contained in:
parent
8477605a51
commit
fedd018d93
@ -5,8 +5,8 @@ assert zlibSupport -> zlib != null;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
majorVersion = "2.2.1";
|
majorVersion = "2.2";
|
||||||
version = "${majorVersion}";
|
version = "${majorVersion}.1";
|
||||||
pythonVersion = "2.7";
|
pythonVersion = "2.7";
|
||||||
libPrefix = "pypy${majorVersion}";
|
libPrefix = "pypy${majorVersion}";
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ wrapPythonPrograms() {
|
|||||||
wrapPythonProgramsIn() {
|
wrapPythonProgramsIn() {
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
local pythonPath="$2"
|
local pythonPath="$2"
|
||||||
local python="$(type -p python)"
|
local python="@executable@"
|
||||||
local i
|
local i
|
||||||
|
|
||||||
declare -A pythonPathsSeen=()
|
declare -A pythonPathsSeen=()
|
||||||
@ -22,7 +22,7 @@ wrapPythonProgramsIn() {
|
|||||||
sed -i "$i" -e "1 s^.*/env[ ]*python^#! $python^"
|
sed -i "$i" -e "1 s^.*/env[ ]*python^#! $python^"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if head -n1 "$i" | grep -q /python; then
|
if head -n1 "$i" | grep -q /@executable_name@; then
|
||||||
# dont wrap EGG-INFO scripts since they are called from python
|
# dont wrap EGG-INFO scripts since they are called from python
|
||||||
if echo "$i" | grep -v EGG-INFO/scripts; then
|
if echo "$i" | grep -v EGG-INFO/scripts; then
|
||||||
echo "wrapping \`$i'..."
|
echo "wrapping \`$i'..."
|
||||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
|||||||
dst=$out/lib/${python.libPrefix}/site-packages
|
dst=$out/lib/${python.libPrefix}/site-packages
|
||||||
mkdir -p $dst
|
mkdir -p $dst
|
||||||
PYTHONPATH="$dst:$PYTHONPATH"
|
PYTHONPATH="$dst:$PYTHONPATH"
|
||||||
${python}/bin/${python.executable} setup.py install --prefix=$out
|
${python}/bin/${python.executable} setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
|
||||||
wrapPythonPrograms
|
wrapPythonPrograms
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ pythonPackages = modules // import ./python-packages-generated.nix {
|
|||||||
wrapPython = pkgs.makeSetupHook
|
wrapPython = pkgs.makeSetupHook
|
||||||
{ deps = pkgs.makeWrapper;
|
{ deps = pkgs.makeWrapper;
|
||||||
substitutions.libPrefix = python.libPrefix;
|
substitutions.libPrefix = python.libPrefix;
|
||||||
|
substitutions.executable_name = python.executable;
|
||||||
|
substitutions.executable = "${python}/bin/${python.executable}";
|
||||||
}
|
}
|
||||||
../development/python-modules/generic/wrap.sh;
|
../development/python-modules/generic/wrap.sh;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user