pythonFull -> python with all modules, pythonFullWithPkgs -> buildEnv

This commit is contained in:
Domen Kožar 2014-10-12 14:59:31 +02:00
parent 8de9ac5bd4
commit a2a7abc67c
5 changed files with 21 additions and 19 deletions

View File

@ -29,7 +29,7 @@ in stdenv.mkDerivation rec {
"-I${dbus_libs}/lib/dbus-1.0/include" ];
# Fix up python path so the lockfile library is on it.
PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.python.libPrefix}/site-packages" [
PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.libPrefix}/site-packages" [
pythonPackages.curses pythonPackages.lockfile
];

View File

@ -1,12 +1,11 @@
{ stdenv, python, buildEnv, makeWrapper, recursivePthLoader, extraLibs ? [], postBuild ? ""
, stdLibs ? stdenv.lib.attrValues python.modules, ignoreCollisions ? false
}:
, ignoreCollisions ? false }:
# Create a python executable that knows about additional packages.
(buildEnv {
name = "python-${python.version}-wrapper";
paths = stdenv.lib.filter (x : x ? pythonPath) (stdenv.lib.closePropagation extraLibs) ++ stdLibs ++ [ python recursivePthLoader ];
name = "python-${python.version}-env";
paths = stdenv.lib.filter (x : x ? pythonPath) (stdenv.lib.closePropagation extraLibs) ++ [ python recursivePthLoader ];
inherit ignoreCollisions;

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation {
patches = [ ./yylex.patch ];
# Workaround to make the python wrapper not drop this package:
# pythonFull.override { extraLibs = [ thrift ]; }
# pythonFullWithPkgs.override { extraLibs = [ thrift ]; }
pythonPath = [];
buildInputs = [

View File

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
buildPhase = ''
patchShebangs .
mkdir -p "$out"
sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.python.libPrefix}/site-packages\"|" -i SConstruct
sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.libPrefix}/site-packages\"|" -i SConstruct
scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \
systemd=yes udevdir="$out/lib/udev" chrpath=no
'';

View File

@ -1875,7 +1875,7 @@ let
openobex = callPackage ../tools/bluetooth/openobex { };
openopc = callPackage ../tools/misc/openopc {
pythonFull = python27Full.override {
pythonFull = python27FullWithPkgs.override {
extraLibs = [ python27Packages.pyro3 ];
};
};
@ -3931,9 +3931,6 @@ let
python2Packages = python27Packages;
python3Packages = python34Packages;
pythonFull = python2Full;
python2Full = python27Full;
python26 = callPackage ../development/interpreters/python/2.6 { db = db47; };
python27 = callPackage ../development/interpreters/python/2.7 { };
python32 = callPackage ../development/interpreters/python/3.2 { };
@ -3942,18 +3939,24 @@ let
pypy = callPackage ../development/interpreters/pypy/2.4 { };
python26Full = callPackage ../development/interpreters/python/wrapper.nix {
extraLibs = [];
postBuild = "";
python = python26;
pythonFull = python2Full;
python2Full = python27Full;
python26Full = python26.override {
includeModules = true;
};
python27Full = python27.override {
includeModules = true;
};
python26FullWithPkgs = callPackage ../development/interpreters/python/wrapper.nix {
python = python26Full;
inherit (python26Packages) recursivePthLoader;
};
python27Full = callPackage ../development/interpreters/python/wrapper.nix {
extraLibs = [];
postBuild = "";
python = python27;
python27FullWithPkgs = callPackage ../development/interpreters/python/wrapper.nix {
python = python27Full;
inherit (python27Packages) recursivePthLoader;
};
pythonFullWithPkgs = python2FullWithPkgs;
python2FullWithPkgs = python27FullWithPkgs;
python2nix = callPackage ../tools/package-management/python2nix { };