python2: Pass configureFlags to modules as well.

Fixes regression from 086e801d51.

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>
This commit is contained in:
aszlig 2015-05-12 17:34:43 +02:00
parent 55e66db0fa
commit a7028d3d07
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961
2 changed files with 10 additions and 8 deletions

View file

@ -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;

View file

@ -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;