Revision: 7208
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7208&view=rev
Author: jdh2358
Date: 2009-06-10 17:39:01 +0000 (Wed, 10 Jun 2009)
Log Message:
-----------
attempt to build win32 installers
Modified Paths:
--------------
trunk/matplotlib/release/win32/Makefile
trunk/matplotlib/release/win32/data/setupwin.py
trunk/matplotlib/release/win32/data/setupwinegg.py
Modified: trunk/matplotlib/release/win32/Makefile
===================================================================
--- trunk/matplotlib/release/win32/Makefile 2009-06-10 16:41:06 UTC (rev
7207)
+++ trunk/matplotlib/release/win32/Makefile 2009-06-10 17:39:01 UTC (rev
7208)
@@ -1,28 +1,17 @@
-PYTHON = C:/Python26/python.exe
+PYDIR = C:/Python26
+PYTHON = ${PYDIR}/python.exe
SRCDIR = ${PWD}
WINSRCDIR = `${PWD}/data/mingw_path.sh ${PWD}`
ZLIBVERSION = 1.2.3
-PNGVERSION = 1.2.23
+PNGVERSION = 1.2.36
FREETYPEVERSION = 2.3.9
-#TCLTKVERSION = 8.4.19
TCLTKVERSION = 8.5.7
-MPLVERSION = 0.98.6svn
+MPLVERSION = 0.98.5.3
## You shouldn't need to configure past this point
-CFLAGS = -Os
-CFLAGS += -I${SRCDIR}/zlib-${ZLIBVERSION}
-CFLAGS += -I${SRCDIR}/libpng-${PNGVERSION}
-CFLAGS += -I${SRCDIR}/freetype-${FREETYPEVERSION}/include
-CFLAGS += -I${SRCDIR}/tcl${TCLTKVERSION}-src/generic
-CFLAGS += -I${SRCDIR}/tcl${TCLTKVERSION}-src/win
-CFLAGS += -I${SRCDIR}/tk${TCLTKVERSION}-src/generic
-CFLAGS += -I${SRCDIR}/tk${TCLTKVERSION}-src/win
-CFLAGS += -I${SRCDIR}/tk${TCLTKVERSION}-src/X11
+CFLAGS = -Os
-LDFLAGS = -L${SRCDIR}/zlib-${ZLIBVERSION}
-LDFLAGS += -L${SRCDIR}/libpng-${PNGVERSION}
-LDFLAGS += -L${SRCDIR}/freetype-${FREETYPEVERSION}
PY_INCLUDE =
"${WINSRCDIR}\\zlib-${ZLIBVERSION};${WINSRCDIR}/libpng-${PNGVERSION};${WINSRCDIR}/freetype-${FREETYPEVERSION}/include;${WINSRCDIR}/tcl${TCLTKVERSION}/generic;${WINSRCDIR}/tcl${TCLTKVERSION}/win;${WINSRCDIR}/tk${TCLTKVERSION}/generic;${WINSRCDIR}/tk${TCLTKVERSION}/win;${WINSRCDIR}/tk${TCLTKVERSION}/xlib"
@@ -47,15 +36,21 @@
rm -rf zlib-${ZLIBVERSION}
tar xvfz zlib-${ZLIBVERSION}.tar.gz
cd zlib-${ZLIBVERSION} &&\
+ export CFLAGS=${CFLAGS} &&\
./configure &&\
make -j3
+# for reasons not clear to me, part of png compilation was failing
+# because it could not find zlib.h, even with the CFLAGS which point
+# to it and even with tryting to pass --includedir to configure. So I
+# manually copy the zlib *.h files into the png dir - JDH
png: zlib
rm -rf libpng-${PNGVERSION}
- tar xvfj libpng-${PNGVERSION}.tar.bz2
+ tar xvfj libpng-${PNGVERSION}.tar.bz2
cd libpng-${PNGVERSION} &&\
- export CFLAGS="${CFLAGS}" &&\
- export LDFLAGS="${LDFLAGS}" &&\
+ cp ${SRCDIR}/zlib-${ZLIBVERSION}/*.h . && \
+ export CFLAGS="${CFLAGS} -I${SRCDIR}/zlib-${ZLIBVERSION}" &&\
+ export LDFLAGS="-L${SRCDIR}/zlib-${ZLIBVERSION}" &&\
./configure --disable-shared &&\
make -j3 &&\
cp .libs/libpng.a .
@@ -69,6 +64,16 @@
mingw32-make -j3 &&\
cp objs/libfreetype.a .
+freetype_hide:
+ rm -rf freetype-${FREETYPEVERSION}
+ tar xvfj freetype-${FREETYPEVERSION}.tar.bz2
+ cd freetype-${FREETYPEVERSION} &&\
+ export CFLAGS=${CFLAGS} &&\
+ ./configure --disable-shared &&\
+ cp builds/win32/w32-mingw32.mk config.mk &&\
+ make -j3 &&\
+ cp objs/libfreetype.a .
+
tcltk:
rm -rf tcl${TCLTKVERSION}
rm -rf tk${TCLTKVERSION}
@@ -83,7 +88,21 @@
cd matplotlib-${MPLVERSION} &&\
rm -rf build &&\
cp ../data/setup*.* . &&\
- ${PYTHON} setupwin.py build_ext -c mingw32 -I ${PY_INCLUDE} -L
${PY_LINKER} bdist_wininst &&\
+ ${PYTHON} setupwin.py build_ext -c mingw32 -I ${PY_INCLUDE} -L
${PY_LINKER} bdist_wininst
${PYTHON} setupwinegg.py build_ext -c mingw32 -I ${PY_INCLUDE} -L
${PY_LINKER} bdist_egg
+
+inplace:
+ #rm -rf matplotlib-${MPLVERSION}
+ #tar xvzf matplotlib-${MPLVERSION}.tar.gz
+ cd matplotlib-${MPLVERSION} &&\
+ rm -rf build lib/matplotlib/*.pyd lib/matplotlib/*.pyc
lib/matplotlib/backends/*.pyd lib/matplotlib/backends/*.pyc &&\
+ cp ../data/setup*.* . &&\
+ ${PYTHON} setup.py build_ext -c mingw32 -I ${PY_INCLUDE} -L
${PY_LINKER} --inplace
+ cd matplotlib-${MPLVERSION}/lib &&\
+ ${PYTHON} -c 'import matplotlib; matplotlib.use("Agg"); from pylab
import *; print matplotlib.__file__; plot([1,2,3]); savefig("test.png")'
+
+test:
+ ${PYTHON} -c 'import matplotlib; matplotlib.use("Agg"); from pylab
import *; print matplotlib.__file__; plot([1,2,3]); savefig("test.png")'
+
all: fetch_deps dependencies installers
Modified: trunk/matplotlib/release/win32/data/setupwin.py
===================================================================
--- trunk/matplotlib/release/win32/data/setupwin.py 2009-06-10 16:41:06 UTC
(rev 7207)
+++ trunk/matplotlib/release/win32/data/setupwin.py 2009-06-10 17:39:01 UTC
(rev 7208)
@@ -2,16 +2,11 @@
try:
# Python 2.6
- # Replace the msvcr func to return an empty list
+ # Replace the msvcr func to return an 'msvcr71'
cygwinccompiler.get_msvcr
- cygwinccompiler.get_msvcr = lambda: []
+ cygwinccompiler.get_msvcr = lambda: ['msvcr71']
except AttributeError:
- # Before Python 2.6
- # Wrap the init func to clear to dll libs
- def new_init(self, **kwargs):
- cygwinccompiler.CygwinCCompiler.__init__(self, **kwargs)
- self.dll_libraries = []
- cygwinccompiler.CygwinCCompiler.__init__ = new_init
+ pass
execfile('setup.py')
Modified: trunk/matplotlib/release/win32/data/setupwinegg.py
===================================================================
--- trunk/matplotlib/release/win32/data/setupwinegg.py 2009-06-10 16:41:06 UTC
(rev 7207)
+++ trunk/matplotlib/release/win32/data/setupwinegg.py 2009-06-10 17:39:01 UTC
(rev 7208)
@@ -7,12 +7,7 @@
cygwinccompiler.get_msvcr = lambda: []
except AttributeError:
- # Before Python 2.6
- # Wrap the init func to clear to dll libs
- def new_init(self, **kwargs):
- cygwinccompiler.CygwinCCompiler.__init__(self, **kwargs)
- self.dll_libraries = []
- cygwinccompiler.CygwinCCompiler.__init__ = new_init
+ pass
from setuptools import setup
execfile('setup.py',
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins