Author: simons
Date: Fri Apr 27 08:20:46 2012
New Revision: 33937
URL: https://nixos.org/websvn/nix/?rev=33937&sc=1
Log:
Updated Python 3.x.
- updated to version 3.2.3
- fixed version numbers in setup-hook.sh
- sort input variable list alphabetically
- tk support needs x11 support as well
- deleted obsolete version 3.1
Furthermore, all CPPFLAGS and LDFLAGS required to find the build inputs are now
explicitly passed to ./configure. The python 3.x build systems tries to ignore
the environment as much as possible to provide deterministic builds. This means
that our magic environment variable stuff won't work, and previously built
python3 binaries lacked all kinds of extensions, such as zlib, etc.
Deleted:
nixpkgs/trunk/pkgs/development/interpreters/python/3.1/
Modified:
nixpkgs/trunk/pkgs/development/interpreters/python/3.2/default.nix
nixpkgs/trunk/pkgs/development/interpreters/python/3.2/setup-hook.sh
nixpkgs/trunk/pkgs/top-level/all-packages.nix
Modified: nixpkgs/trunk/pkgs/development/interpreters/python/3.2/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/interpreters/python/3.2/default.nix Thu Apr
26 15:19:23 2012 (r33936)
+++ nixpkgs/trunk/pkgs/development/interpreters/python/3.2/default.nix Fri Apr
27 08:20:46 2012 (r33937)
@@ -1,14 +1,14 @@
{ stdenv, fetchurl
-, zlib
, bzip2
-, gdbm
-, sqlite
, db4
+, gdbm
+, libX11, xproto
, ncurses
-, readline
, openssl
+, readline
+, sqlite
, tcl, tk
-, libX11, xproto
+, zlib
}:
assert readline != null -> ncurses != null;
@@ -17,7 +17,7 @@
let
majorVersion = "3.2";
- version = "${majorVersion}";
+ version = "${majorVersion}.3";
buildInputs = filter (p: p != null) [
zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto
@@ -29,21 +29,20 @@
src = fetchurl {
url =
"http://www.python.org/ftp/python/${version}/Python-${version}.tar.bz2";
- sha256 = "06awxchnv8gai6415pgzz2x8f1xi38v8a4anz6n39ciwq7v5zzbv";
+ sha256 =
"5648ec81f93870fde2f0aa4ed45c8718692b15ce6fd9ed309bfb827ae12010aa";
};
- inherit buildInputs;
-
- C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
- LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
- configureFlags = "--enable-shared --with-threads --enable-unicode
--with-wctype-functions";
-
preConfigure = ''
for i in /usr /sw /opt /pkg; do # improve purity
substituteInPlace ./setup.py --replace $i /no-such-path
done
- ${optionalString (ncurses != null) ''export NIX_LDFLAGS="$NIX_LDFLAGS
-lncurses"''}
- ${optionalString stdenv.isDarwin ''export
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
+ ${optionalString stdenv.isDarwin ''export
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
+
+ configureFlagsArray=( --enable-shared --with-threads
+ CPPFLAGS="${concatStringsSep " " (map (p:
"-I${p}/include") buildInputs)}"
+ LDFLAGS="${concatStringsSep " " (map (p:
"-L${p}/lib") buildInputs)}"
+ LIBS="-lcrypt ${optionalString (ncurses != null)
"-lncurses"}"
+ )
'';
setupHook = ./setup-hook.sh;
@@ -58,7 +57,7 @@
db4Support = db4 != null;
readlineSupport = readline != null;
opensslSupport = openssl != null;
- tkSupport = (tk != null) && (tcl != null);
+ tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto
!= null);
libPrefix = "python${majorVersion}";
};
Modified: nixpkgs/trunk/pkgs/development/interpreters/python/3.2/setup-hook.sh
==============================================================================
--- nixpkgs/trunk/pkgs/development/interpreters/python/3.2/setup-hook.sh
Thu Apr 26 15:19:23 2012 (r33936)
+++ nixpkgs/trunk/pkgs/development/interpreters/python/3.2/setup-hook.sh
Fri Apr 27 08:20:46 2012 (r33937)
@@ -1,12 +1,12 @@
addPythonPath() {
- addToSearchPathWithCustomDelimiter : PYTHONPATH
$1/lib/python3.1/site-packages
+ addToSearchPathWithCustomDelimiter : PYTHONPATH
$1/lib/python3.2/site-packages
}
toPythonPath() {
local paths="$1"
local result=
for i in $paths; do
- p="$i/lib/python3.1/site-packages"
+ p="$i/lib/python3.2/site-packages"
result="${result}${result:+:}$p"
done
echo $result
Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix Thu Apr 26 15:19:23
2012 (r33936)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Fri Apr 27 08:20:46
2012 (r33937)
@@ -2757,8 +2757,6 @@
python27 = callPackage ../development/interpreters/python/2.7 { };
- python31 = callPackage ../development/interpreters/python/3.1 { };
-
python32 = callPackage ../development/interpreters/python/3.2 { };
pythonFull = python27Full;
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits