* Hackery to get Python to build on Cygwin.

svn path=/nixpkgs/branches/modular-python/; revision=26694
This commit is contained in:
Eelco Dolstra 2011-04-05 14:29:11 +00:00
parent db144edb60
commit 566d5ab26e

View File

@ -55,6 +55,12 @@ let
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.
mkdir -p $out/lib/python2.7/config
touch $out/lib/python2.7/config/Makefile
mkdir -p $out/include/python2.7
touch $out/include/python2.7/pyconfig.h
'';
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2";
@ -128,7 +134,7 @@ let
''
dest=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dest
cp -p $(find . -name "*.so") $dest/
cp -p $(find . -name "*.${if stdenv.isCygwin then "dll" else "so"}") $dest/
'';
};