summary refs log tree commit diff
path: root/pkgs/development/interpreters/python
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-05-12 17:34:43 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-05-12 18:06:33 +0200
commita7028d3d07dade2305b7a94d39bec208d605617c (patch)
treef8bcf764928956dddb14d80f541f25ef2312d06b /pkgs/development/interpreters/python
parent55e66db0fa3d7543d93397f60efd06ffc370232f (diff)
downloadnixlib-a7028d3d07dade2305b7a94d39bec208d605617c.tar
nixlib-a7028d3d07dade2305b7a94d39bec208d605617c.tar.gz
nixlib-a7028d3d07dade2305b7a94d39bec208d605617c.tar.bz2
nixlib-a7028d3d07dade2305b7a94d39bec208d605617c.tar.lz
nixlib-a7028d3d07dade2305b7a94d39bec208d605617c.tar.xz
nixlib-a7028d3d07dade2305b7a94d39bec208d605617c.tar.zst
nixlib-a7028d3d07dade2305b7a94d39bec208d605617c.zip
python2: Pass configureFlags to modules as well.
Fixes regression from 086e801d5132bcf9a4e4cac56c361651b7b22ac0.

The switch tu UCS-4 only happened for the main Python interpreter and
libraries, but the extension modules were using the same source but
without any configureFlags, so the extensions still referred to UCS-2
symbols.

Tested module builds of Python 2.7 and all modules except crypto fail.
Also tested against sqlite3 module of Python 2.6, although for other
modules there still seems to be an unrelated build failure with Tcl/Tk
libraries, so we might need to fix that later.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r--pkgs/development/interpreters/python/2.6/default.nix9
-rw-r--r--pkgs/development/interpreters/python/2.7/default.nix9
2 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix
index 10c52e958d8f..4e322faf66f0 100644
--- a/pkgs/development/interpreters/python/2.6/default.nix
+++ b/pkgs/development/interpreters/python/2.6/default.nix
@@ -46,6 +46,8 @@ let
       touch $out/include/python${majorVersion}/pyconfig.h
     '';
 
+  configureFlags = "--enable-shared --with-threads --enable-unicode=ucs4";
+
   buildInputs =
     optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
     [ bzip2 openssl ]++ optionals includeModules [ db openssl ncurses gdbm readline x11 tcl tk sqlite ]
@@ -58,13 +60,12 @@ let
     name = "python${if includeModules then "" else "-minimal"}-${version}";
     pythonVersion = majorVersion;
 
-    inherit majorVersion version src patches buildInputs preConfigure;
+    inherit majorVersion version src patches buildInputs preConfigure
+            configureFlags;
 
     C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
     LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
 
-    configureFlags = "--enable-shared --with-threads --enable-unicode=ucs4";
-
     NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2";
 
     setupHook = ./setup-hook.sh;
@@ -131,7 +132,7 @@ let
     if includeModules then null else stdenv.mkDerivation rec {
       name = "python-${moduleName}-${python.version}";
 
-      inherit src patches preConfigure;
+      inherit src patches preConfigure configureFlags;
 
       buildInputs = [ python ] ++ deps;
 
diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix
index e9d9dc6824d0..ac9b9d637096 100644
--- a/pkgs/development/interpreters/python/2.7/default.nix
+++ b/pkgs/development/interpreters/python/2.7/default.nix
@@ -58,6 +58,8 @@ let
       touch $out/include/python${majorVersion}/pyconfig.h
     '';
 
+  configureFlags = "--enable-shared --with-threads --enable-unicode=ucs4";
+
   buildInputs =
     optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
     [ bzip2 openssl ]
@@ -73,14 +75,13 @@ let
     name = "python-${version}";
     pythonVersion = majorVersion;
 
-    inherit majorVersion version src patches buildInputs preConfigure;
+    inherit majorVersion version src patches buildInputs preConfigure
+            configureFlags;
 
     LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
     C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
     LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
 
-    configureFlags = "--enable-shared --with-threads --enable-unicode=ucs4";
-
     NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2";
     DETERMINISTIC_BUILD = 1;
 
@@ -149,7 +150,7 @@ let
     if includeModules then null else stdenv.mkDerivation rec {
       name = "python-${moduleName}-${python.version}";
 
-      inherit src patches preConfigure;
+      inherit src patches preConfigure configureFlags;
 
       buildInputs = [ python ] ++ deps;