python-2.7: fix sqlite3 impurity
The build expression for python contains code that patches all occurrences of impure paths like "/usr" and "/opt" out of "setup.py". The same code must be run when building a python module, too. svn path=/nixpkgs/trunk/; revision=27164
This commit is contained in:
parent
f0f900f41b
commit
e4033547a3
|
@ -36,6 +36,13 @@ let
|
||||||
++ optional zlibSupport zlib
|
++ optional zlibSupport zlib
|
||||||
++ optionals stdenv.isDarwin [ darwinArchUtility darwinSwVersUtility ];
|
++ optionals stdenv.isDarwin [ darwinArchUtility darwinSwVersUtility ];
|
||||||
|
|
||||||
|
ensurePurity =
|
||||||
|
''
|
||||||
|
# Purity.
|
||||||
|
for i in /usr /sw /opt /pkg; do
|
||||||
|
substituteInPlace ./setup.py --replace $i /no-such-path
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
# Build the basic Python interpreter without modules that have
|
# Build the basic Python interpreter without modules that have
|
||||||
# external dependencies.
|
# external dependencies.
|
||||||
|
@ -49,13 +56,8 @@ let
|
||||||
|
|
||||||
configureFlags = "--enable-shared --with-threads --enable-unicode --with-wctype-functions";
|
configureFlags = "--enable-shared --with-threads --enable-unicode --with-wctype-functions";
|
||||||
|
|
||||||
preConfigure =
|
preConfigure = "${ensurePurity}" + optionalString stdenv.isCygwin
|
||||||
''
|
''
|
||||||
# Purity.
|
|
||||||
for i in /usr /sw /opt /pkg; do
|
|
||||||
substituteInPlace ./setup.py --replace $i /no-such-path
|
|
||||||
done
|
|
||||||
'' + optionalString stdenv.isCygwin ''
|
|
||||||
# On Cygwin, `make install' tries to read this Makefile.
|
# On Cygwin, `make install' tries to read this Makefile.
|
||||||
mkdir -p $out/lib/python${majorVersion}/config
|
mkdir -p $out/lib/python${majorVersion}/config
|
||||||
touch $out/lib/python${majorVersion}/config/Makefile
|
touch $out/lib/python${majorVersion}/config/Makefile
|
||||||
|
@ -115,7 +117,7 @@ let
|
||||||
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
|
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
|
||||||
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
|
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
|
||||||
|
|
||||||
configurePhase = "true";
|
configurePhase = "${ensurePurity}";
|
||||||
|
|
||||||
buildPhase =
|
buildPhase =
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue