mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 17:39:34 +00:00
* wrapPythonPrograms: don't hard-code the Python library prefix.
svn path=/nixpkgs/branches/modular-python/; revision=26594
This commit is contained in:
parent
11b67ccee5
commit
353d450867
pkgs
applications
build-support
development/python-modules/generic
servers/gpsd
top-level
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, python, pythonPackages, wrapPython }:
|
{ stdenv, fetchurl, pythonPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.3";
|
version = "2.3";
|
||||||
|
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "07kx41w4gqv68bcykdflsg68wvpmcyqknzyb4vr1zqlf27hahp53";
|
sha256 = "07kx41w4gqv68bcykdflsg68wvpmcyqknzyb4vr1zqlf27hahp53";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python wrapPython ];
|
buildInputs = [ pythonPackages.python pythonPackages.wrapPython ];
|
||||||
|
|
||||||
# Readline support is needed by bzrtools.
|
# Readline support is needed by bzrtools.
|
||||||
pythonPath = [ pythonPackages.ssl pythonPackages.readline ];
|
pythonPath = [ pythonPackages.ssl pythonPackages.readline ];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl, python
|
{ stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl
|
||||||
, libuuid, gettext, ncurses, dev86, iasl, pciutils, bzip2, xz
|
, libuuid, gettext, ncurses, dev86, iasl, pciutils, bzip2, xz
|
||||||
, lvm2, utillinux, procps, texinfo, perl, wrapPython, pythonPackages }:
|
, lvm2, utillinux, procps, texinfo, perl, pythonPackages }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
|
@ -50,8 +50,9 @@ stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ which zlib pkgconfig SDL openssl python libuuid gettext ncurses
|
[ which zlib pkgconfig SDL openssl libuuid gettext ncurses
|
||||||
dev86 iasl pciutils bzip2 xz texinfo perl wrapPython
|
dev86 iasl pciutils bzip2 xz texinfo perl
|
||||||
|
pythonPackages.python pythonPackages.wrapPython
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPath = [ pythonPackages.curses ];
|
pythonPath = [ pythonPackages.curses ];
|
||||||
|
|
|
@ -45,13 +45,15 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
# Make a package that just contains a setup hook with the given contents.
|
# Make a package that just contains a setup hook with the given contents.
|
||||||
makeSetupHook = deps: script:
|
makeSetupHook = { deps ? [], substitutions ? {} }: script:
|
||||||
runCommand "hook" { }
|
runCommand "hook" substitutions
|
||||||
(''
|
(''
|
||||||
ensureDir $out/nix-support
|
ensureDir $out/nix-support
|
||||||
cp ${script} $out/nix-support/setup-hook
|
cp ${script} $out/nix-support/setup-hook
|
||||||
'' + stdenv.lib.optionalString (deps != []) ''
|
'' + stdenv.lib.optionalString (deps != []) ''
|
||||||
echo ${toString deps} > $out/nix-support/propagated-build-native-inputs
|
echo ${toString deps} > $out/nix-support/propagated-build-native-inputs
|
||||||
|
'' + stdenv.lib.optionalString (substitutions != {}) ''
|
||||||
|
substituteAll ${script} $out/nix-support/setup-hook
|
||||||
'');
|
'');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ _addToPythonPath() {
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
if [ -n "${pythonPathsSeen[$dir]}" ]; then return; fi
|
if [ -n "${pythonPathsSeen[$dir]}" ]; then return; fi
|
||||||
pythonPathsSeen[$dir]=1
|
pythonPathsSeen[$dir]=1
|
||||||
addToSearchPath program_PYTHONPATH $dir/lib/python2.7/site-packages
|
addToSearchPath program_PYTHONPATH $dir/lib/@libPrefix@/site-packages
|
||||||
addToSearchPath program_PATH $dir/bin
|
addToSearchPath program_PATH $dir/bin
|
||||||
local prop="$dir/nix-support/propagated-build-native-inputs"
|
local prop="$dir/nix-support/propagated-build-native-inputs"
|
||||||
if [ -e $prop ]; then
|
if [ -e $prop ]; then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ fetchurl, stdenv, python, pkgconfig, dbus, dbus_glib
|
{ fetchurl, stdenv, pythonPackages, pkgconfig, dbus, dbus_glib
|
||||||
, ncurses, libX11, libXt, libXpm, libXaw, libXext, wrapPython
|
, ncurses, libX11, libXt, libXpm, libXaw, libXext
|
||||||
, libxslt, xmlto, gpsdUser ? "gpsd", pythonPackages }:
|
, libxslt, xmlto, gpsdUser ? "gpsd" }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gpsd-2.39";
|
name = "gpsd-2.39";
|
||||||
|
@ -11,9 +11,9 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python pkgconfig dbus dbus_glib ncurses
|
pythonPackages.python pythonPackages.wrapPython
|
||||||
libX11 libXt libXpm libXaw libXext
|
pkgconfig dbus dbus_glib ncurses libX11 libXt libXpm libXaw libXext
|
||||||
wrapPython libxslt xmlto
|
libxslt xmlto
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPath = [ pythonPackages.curses ];
|
pythonPath = [ pythonPackages.curses ];
|
||||||
|
|
|
@ -312,9 +312,7 @@ let
|
||||||
inherit stdenv perl cpio contents ubootChooser;
|
inherit stdenv perl cpio contents ubootChooser;
|
||||||
};
|
};
|
||||||
|
|
||||||
makeWrapper = makeSetupHook [] ../build-support/make-wrapper/make-wrapper.sh;
|
makeWrapper = makeSetupHook {} ../build-support/make-wrapper/make-wrapper.sh;
|
||||||
|
|
||||||
wrapPython = makeSetupHook [ makeWrapper ] ../development/python-modules/generic/wrap.sh;
|
|
||||||
|
|
||||||
makeModulesClosure = {kernel, rootModules, allowMissing ? false}:
|
makeModulesClosure = {kernel, rootModules, allowMissing ? false}:
|
||||||
import ../build-support/kernel/modules-closure.nix {
|
import ../build-support/kernel/modules-closure.nix {
|
||||||
|
|
|
@ -10,17 +10,23 @@ python.modules // rec {
|
||||||
|
|
||||||
|
|
||||||
buildPythonPackage = import ../development/python-modules/generic {
|
buildPythonPackage = import ../development/python-modules/generic {
|
||||||
inherit (pkgs) wrapPython lib;
|
inherit (pkgs) lib;
|
||||||
inherit python setuptools;
|
inherit python wrapPython setuptools;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
setuptools = import ../development/python-modules/setuptools {
|
setuptools = import ../development/python-modules/setuptools {
|
||||||
inherit (pkgs) stdenv fetchurl wrapPython;
|
inherit (pkgs) stdenv fetchurl;
|
||||||
inherit python;
|
inherit python wrapPython;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
wrapPython = pkgs.makeSetupHook
|
||||||
|
{ deps = pkgs.makeWrapper;
|
||||||
|
substitutions.libPrefix = python.libPrefix;
|
||||||
|
}
|
||||||
|
../development/python-modules/generic/wrap.sh;
|
||||||
|
|
||||||
|
|
||||||
argparse = buildPythonPackage (rec {
|
argparse = buildPythonPackage (rec {
|
||||||
name = "argparse-1.1";
|
name = "argparse-1.1";
|
||||||
|
|
Loading…
Reference in a new issue