From fedd018d937f638494c48a9d7cae7d80842d134d Mon Sep 17 00:00:00 2001 From: Domen Kozar Date: Fri, 7 Mar 2014 14:33:59 +0100 Subject: [PATCH] fix pypy and pypyPackages --- pkgs/development/interpreters/pypy/2.2/default.nix | 4 ++-- pkgs/development/python-modules/generic/wrap.sh | 4 ++-- pkgs/development/python-modules/setuptools/default.nix | 2 +- pkgs/top-level/python-packages.nix | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/pypy/2.2/default.nix b/pkgs/development/interpreters/pypy/2.2/default.nix index 231a0a7dfaa5..2fee7bc74df7 100644 --- a/pkgs/development/interpreters/pypy/2.2/default.nix +++ b/pkgs/development/interpreters/pypy/2.2/default.nix @@ -5,8 +5,8 @@ assert zlibSupport -> zlib != null; let - majorVersion = "2.2.1"; - version = "${majorVersion}"; + majorVersion = "2.2"; + version = "${majorVersion}.1"; pythonVersion = "2.7"; libPrefix = "pypy${majorVersion}"; diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index a7c839799b1f..bd1f526900a5 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -5,7 +5,7 @@ wrapPythonPrograms() { wrapPythonProgramsIn() { local dir="$1" local pythonPath="$2" - local python="$(type -p python)" + local python="@executable@" local i declare -A pythonPathsSeen=() @@ -22,7 +22,7 @@ wrapPythonProgramsIn() { sed -i "$i" -e "1 s^.*/env[ ]*python^#! $python^" 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 if echo "$i" | grep -v EGG-INFO/scripts; then echo "wrapping \`$i'..." diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index 35630be22553..e33c815d23bc 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { dst=$out/lib/${python.libPrefix}/site-packages mkdir -p $dst 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 ''; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9cbfbe1b3f8c..544ae1694b90 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -28,6 +28,8 @@ pythonPackages = modules // import ./python-packages-generated.nix { wrapPython = pkgs.makeSetupHook { deps = pkgs.makeWrapper; substitutions.libPrefix = python.libPrefix; + substitutions.executable_name = python.executable; + substitutions.executable = "${python}/bin/${python.executable}"; } ../development/python-modules/generic/wrap.sh;