Author: eelco
Date: Tue Mar 29 15:02:15 2011
New Revision: 26593
URL: https://svn.nixos.org/websvn/nix/?rev=26593&sc=1
Log:
* Move buildPythonPackage and setuptools into python-packages.nix.
This ensures that they're built with the same "python" argument.
Modified:
nixpkgs/branches/modular-python/pkgs/development/python-modules/setuptools/default.nix
nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix
nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix
Modified:
nixpkgs/branches/modular-python/pkgs/development/python-modules/setuptools/default.nix
==============================================================================
---
nixpkgs/branches/modular-python/pkgs/development/python-modules/setuptools/default.nix
Tue Mar 29 14:17:19 2011 (r26592)
+++
nixpkgs/branches/modular-python/pkgs/development/python-modules/setuptools/default.nix
Tue Mar 29 15:02:15 2011 (r26593)
@@ -1,48 +1,29 @@
-a :
-let
- fetchurl = a.fetchurl;
-
- version = a.lib.attrByPath ["version"] "0.6c11" a;
- buildInputs = with a; [
- python makeWrapper
- ];
-in
-rec {
- name = "setuptools-" + version;
+{ stdenv, fetchurl, python, wrapPython }:
+
+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 ];
+
+ buildPhase = "python setup.py build --build-base $out";
- doCheck = true;
+ installPhase =
+ ''
+ dst=$out/lib/${python.libPrefix}/site-packages
+ mkdir -p $dst
+ PYTHONPATH=$dst:$PYTHONPATH
+ python setup.py install --prefix=$out
+ wrapPythonPrograms
+ '';
- doMakeCheck = a.fullDepEntry (''
- python setup.py test
- '') ["minInit" "doUnpack" "addInputs" "doBuild"];
-
- doBuild = a.fullDepEntry(''
- python setup.py build --build-base $out
- '') ["addInputs" "doUnpack"];
-
- 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"];
+ doCheck = false; # doesn't work with Python 2.7
- phaseNames = ["doBuild" "doInstall"];
+ checkPhase = "python setup.py test";
meta = {
description = "Utilities to facilitate the installation of Python
packages";
Modified: nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix Tue Mar
29 14:17:19 2011 (r26592)
+++ nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix Tue Mar
29 15:02:15 2011 (r26593)
@@ -4299,20 +4299,13 @@
### 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 @@
pyxml = callPackage ../development/python-modules/pyxml { };
- setuptools = builderDefsPackage (import
../development/python-modules/setuptools) {
- inherit python makeWrapper;
- };
+ setuptools = pythonPackages.setuptools;
wxPython = wxPython26;
Modified: nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix
==============================================================================
--- nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix Tue Mar
29 14:17:19 2011 (r26592)
+++ nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix Tue Mar
29 15:02:15 2011 (r26593)
@@ -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";
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits