* Move buildPythonPackage and setuptools into python-packages.nix.
This ensures that they're built with the same "python" argument. svn path=/nixpkgs/branches/modular-python/; revision=26593
This commit is contained in:
parent
1439ae44be
commit
11b67ccee5
|
@ -1,48 +1,29 @@
|
||||||
a :
|
{ stdenv, fetchurl, python, wrapPython }:
|
||||||
let
|
|
||||||
fetchurl = a.fetchurl;
|
|
||||||
|
|
||||||
version = a.lib.attrByPath ["version"] "0.6c11" a;
|
stdenv.mkDerivation rec {
|
||||||
buildInputs = with a; [
|
name = "setuptools-0.6c11";
|
||||||
python makeWrapper
|
|
||||||
];
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
name = "setuptools-" + version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz";
|
url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz";
|
||||||
sha256 = "1lx1hwxkhipyh206bgl90ddnfcnb68bzcvyawczbf833fadyl3v3";
|
sha256 = "1lx1hwxkhipyh206bgl90ddnfcnb68bzcvyawczbf833fadyl3v3";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit buildInputs;
|
buildInputs = [ python wrapPython ];
|
||||||
configureFlags = [];
|
|
||||||
|
|
||||||
doCheck = true;
|
buildPhase = "python setup.py build --build-base $out";
|
||||||
|
|
||||||
doMakeCheck = a.fullDepEntry (''
|
installPhase =
|
||||||
python setup.py test
|
''
|
||||||
'') ["minInit" "doUnpack" "addInputs" "doBuild"];
|
dst=$out/lib/${python.libPrefix}/site-packages
|
||||||
|
mkdir -p $dst
|
||||||
|
PYTHONPATH=$dst:$PYTHONPATH
|
||||||
|
python setup.py install --prefix=$out
|
||||||
|
wrapPythonPrograms
|
||||||
|
'';
|
||||||
|
|
||||||
doBuild = a.fullDepEntry(''
|
doCheck = false; # doesn't work with Python 2.7
|
||||||
python setup.py build --build-base $out
|
|
||||||
'') ["addInputs" "doUnpack"];
|
|
||||||
|
|
||||||
doInstall = a.fullDepEntry(''
|
checkPhase = "python setup.py test";
|
||||||
ensureDir "$out/lib/${a.python.libPrefix}/site-packages"
|
|
||||||
|
|
||||||
PYTHONPATH="$out/lib/${a.python.libPrefix}/site-packages:$PYTHONPATH" \
|
|
||||||
python setup.py install --prefix="$out"
|
|
||||||
|
|
||||||
for i in "$out/bin/"*
|
|
||||||
do
|
|
||||||
wrapProgram "$i" \
|
|
||||||
--prefix PYTHONPATH ":" \
|
|
||||||
"$out/lib/${a.python.libPrefix}/site-packages"
|
|
||||||
done
|
|
||||||
'') ["doBuild"];
|
|
||||||
|
|
||||||
phaseNames = ["doBuild" "doInstall"];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Utilities to facilitate the installation of Python packages";
|
description = "Utilities to facilitate the installation of Python packages";
|
||||||
|
|
|
@ -4299,20 +4299,13 @@ let
|
||||||
|
|
||||||
### DEVELOPMENT / PYTHON MODULES
|
### DEVELOPMENT / PYTHON MODULES
|
||||||
|
|
||||||
buildPythonPackage = buildPython27Package;
|
buildPythonPackage = pythonPackages.buildPythonPackage;
|
||||||
|
|
||||||
buildPython27Package = import ../development/python-modules/generic {
|
|
||||||
inherit wrapPython lib;
|
|
||||||
python = python27;
|
|
||||||
setuptools = setuptools.override { python = python27; doCheck = false; };
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonPackages = python27Packages;
|
pythonPackages = python27Packages;
|
||||||
|
|
||||||
python27Packages = recurseIntoAttrs (import ./python-packages.nix {
|
python27Packages = recurseIntoAttrs (import ./python-packages.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
python = python27;
|
python = python27;
|
||||||
buildPythonPackage = buildPython27Package;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
foursuite = callPackage ../development/python-modules/4suite { };
|
foursuite = callPackage ../development/python-modules/4suite { };
|
||||||
|
@ -4355,9 +4348,7 @@ let
|
||||||
|
|
||||||
pyxml = callPackage ../development/python-modules/pyxml { };
|
pyxml = callPackage ../development/python-modules/pyxml { };
|
||||||
|
|
||||||
setuptools = builderDefsPackage (import ../development/python-modules/setuptools) {
|
setuptools = pythonPackages.setuptools;
|
||||||
inherit python makeWrapper;
|
|
||||||
};
|
|
||||||
|
|
||||||
wxPython = wxPython26;
|
wxPython = wxPython26;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,26 @@
|
||||||
{ pkgs, python, buildPythonPackage }:
|
{ pkgs, python }:
|
||||||
|
|
||||||
python.modules // rec {
|
python.modules // rec {
|
||||||
|
|
||||||
|
inherit python;
|
||||||
|
|
||||||
inherit (pkgs) fetchurl fetchsvn stdenv;
|
inherit (pkgs) fetchurl fetchsvn stdenv;
|
||||||
|
|
||||||
inherit (python.modules) ssl;
|
inherit (python.modules) ssl;
|
||||||
|
|
||||||
|
|
||||||
|
buildPythonPackage = import ../development/python-modules/generic {
|
||||||
|
inherit (pkgs) wrapPython lib;
|
||||||
|
inherit python setuptools;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
setuptools = import ../development/python-modules/setuptools {
|
||||||
|
inherit (pkgs) stdenv fetchurl wrapPython;
|
||||||
|
inherit python;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
argparse = buildPythonPackage (rec {
|
argparse = buildPythonPackage (rec {
|
||||||
name = "argparse-1.1";
|
name = "argparse-1.1";
|
||||||
|
|
Loading…
Reference in New Issue