* 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 :
|
||||
let
|
||||
fetchurl = a.fetchurl;
|
||||
{ stdenv, fetchurl, python, wrapPython }:
|
||||
|
||||
version = a.lib.attrByPath ["version"] "0.6c11" a;
|
||||
buildInputs = with a; [
|
||||
python makeWrapper
|
||||
];
|
||||
in
|
||||
rec {
|
||||
name = "setuptools-" + version;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "setuptools-0.6c11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz";
|
||||
sha256 = "1lx1hwxkhipyh206bgl90ddnfcnb68bzcvyawczbf833fadyl3v3";
|
||||
};
|
||||
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
buildInputs = [ python wrapPython ];
|
||||
|
||||
doCheck = true;
|
||||
buildPhase = "python setup.py build --build-base $out";
|
||||
|
||||
doMakeCheck = a.fullDepEntry (''
|
||||
python setup.py test
|
||||
'') ["minInit" "doUnpack" "addInputs" "doBuild"];
|
||||
installPhase =
|
||||
''
|
||||
dst=$out/lib/${python.libPrefix}/site-packages
|
||||
mkdir -p $dst
|
||||
PYTHONPATH=$dst:$PYTHONPATH
|
||||
python setup.py install --prefix=$out
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
||||
doBuild = a.fullDepEntry(''
|
||||
python setup.py build --build-base $out
|
||||
'') ["addInputs" "doUnpack"];
|
||||
doCheck = false; # doesn't work with Python 2.7
|
||||
|
||||
doInstall = a.fullDepEntry(''
|
||||
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"];
|
||||
checkPhase = "python setup.py test";
|
||||
|
||||
meta = {
|
||||
description = "Utilities to facilitate the installation of Python packages";
|
||||
|
@ -4299,20 +4299,13 @@ let
|
||||
|
||||
### DEVELOPMENT / PYTHON MODULES
|
||||
|
||||
buildPythonPackage = buildPython27Package;
|
||||
|
||||
buildPython27Package = import ../development/python-modules/generic {
|
||||
inherit wrapPython lib;
|
||||
python = python27;
|
||||
setuptools = setuptools.override { python = python27; doCheck = false; };
|
||||
};
|
||||
buildPythonPackage = pythonPackages.buildPythonPackage;
|
||||
|
||||
pythonPackages = python27Packages;
|
||||
|
||||
python27Packages = recurseIntoAttrs (import ./python-packages.nix {
|
||||
inherit pkgs;
|
||||
python = python27;
|
||||
buildPythonPackage = buildPython27Package;
|
||||
});
|
||||
|
||||
foursuite = callPackage ../development/python-modules/4suite { };
|
||||
@ -4355,9 +4348,7 @@ let
|
||||
|
||||
pyxml = callPackage ../development/python-modules/pyxml { };
|
||||
|
||||
setuptools = builderDefsPackage (import ../development/python-modules/setuptools) {
|
||||
inherit python makeWrapper;
|
||||
};
|
||||
setuptools = pythonPackages.setuptools;
|
||||
|
||||
wxPython = wxPython26;
|
||||
|
||||
|
@ -1,11 +1,26 @@
|
||||
{ pkgs, python, buildPythonPackage }:
|
||||
{ pkgs, python }:
|
||||
|
||||
python.modules // rec {
|
||||
|
||||
inherit python;
|
||||
|
||||
inherit (pkgs) fetchurl fetchsvn stdenv;
|
||||
|
||||
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 {
|
||||
name = "argparse-1.1";
|
||||
|
Loading…
Reference in New Issue
Block a user