Skip to content

Commit cd4b823

Browse files
committed
initial win32 build import
svn path=/trunk/matplotlib/; revision=7140
1 parent 4472927 commit cd4b823

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

release/win32/Makefile

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
PYTHON=python
2+
SRCDIR=${PWD}
3+
ZLIBVERSION=1.2.3
4+
PNGVERSION=1.2.33
5+
FREETYPEVERSION=2.3.7
6+
MPLVERSION=0.98.5.3
7+
8+
## You shouldn't need to configure past this point
9+
10+
CFLAGS="-Os -I${SRCDIR}/zlib-${ZLIBVERSION} -I${SRCDIR}/libpng-${PNGVERSION} -I${SRCDIR}/freetype-${FREETYPEVERSION}/include"
11+
12+
LDFLAGS="-L${SRCDIR}/zlib-${ZLIBVERSION} -L${SRCDIR}/libpng-${PNGVERSION} -L${SRCDIR}/freetype-${FREETYPEVERSION}"
13+
14+
clean:
15+
rm -rf zlib-${ZLIBVERSION}.tar.gz libpng-${PNGVERSION}.tar.bz2 \
16+
freetype-${FREETYPEVERSION}.tar.bz2 \
17+
zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION} \
18+
matplotlib-${MPLVERSION} *~
19+
20+
fetch_deps:
21+
wget http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz
22+
wget http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-${PNGVERSION}.tar.bz2
23+
wget http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2
24+
25+
zlib:
26+
tar xvfz zlib-${ZLIBVERSION}.tar.gz
27+
cd zlib-${ZLIBVERSION} &&\
28+
./configure &&\
29+
make -j3
30+
31+
png: zlib
32+
tar xvfj libpng-${PNGVERSION}.tar.bz2
33+
cd libpng-${PNGVERSION} &&\
34+
export CFLAGS=${CFLAGS} &&\
35+
export LDFLAGS=${LDFLAGS} &&\
36+
./configure --disable-shared &&\
37+
make -j3 &&\
38+
cp .libs/libpng.a .
39+
40+
freetype:
41+
tar xvfj freetype-${FREETYPEVERSION}.tar.bz2 &&\
42+
cd freetype-${FREETYPEVERSION} &&\
43+
export GNUMAKE=mingw32-make &&\
44+
./configure --disable-shared &&\
45+
cp builds/win32/w32-mingw32.mk config.mk &&\
46+
mingw32-make -j3 &&\
47+
cp objs/libfreetype.a .
48+
49+
dependencies: png freetype
50+
51+
installers:
52+
tar xvzf matplotlib-${MPLVERSION}.tar.gz &&\
53+
cd matplotlib-${MPLVERSION} &&\
54+
rm -rf build &&\
55+
cp ../data/setup.cfg . &&\
56+
export CFLAGS=${CFLAGS} &&\
57+
export LDFLAGS=${LDFLAGS} &&\
58+
${PYTHON} setup.py build -c mingw32 bdist_wininst &&\
59+
${PYTHON) setupegg.py build -c mingw32 bdist_egg
60+
61+
all: fetch_deps dependencies installers

release/win32/data/setup.cfg

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Rename this file to setup.cfg to modify matplotlib's
2+
# build options.
3+
4+
[egg_info]
5+
tag_svn_revision = 0
6+
7+
[status]
8+
# To suppress display of the dependencies and their versions
9+
# at the top of the build log, uncomment the following line:
10+
#suppress = True
11+
#
12+
# Uncomment to insert lots of diagnostic prints in extension code
13+
#verbose = True
14+
15+
[provide_packages]
16+
# By default, matplotlib checks for a few dependencies and
17+
# installs them if missing. This feature can be turned off
18+
# by uncommenting the following lines. Acceptible values are:
19+
# True: install, overwrite an existing installation
20+
# False: do not install
21+
# auto: install only if the package is unavailable. This
22+
# is the default behavior
23+
#
24+
## Date/timezone support:
25+
pytz = True
26+
dateutil = True
27+
28+
29+
[gui_support]
30+
# Matplotlib supports multiple GUI toolkits, including Cocoa,
31+
# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of
32+
# these toolkits requires AGG, the Anti-Grain Geometry library,
33+
# which is provided by matplotlib and built by default.
34+
#
35+
# Some backends are written in pure Python, and others require
36+
# extension code to be compiled. By default, matplotlib checks
37+
# for these GUI toolkits during installation and, if present,
38+
# compiles the required extensions to support the toolkit. GTK
39+
# support requires the GTK runtime environment and PyGTK. Wx
40+
# support requires wxWidgets and wxPython. Tk support requires
41+
# Tk and Tkinter. The other GUI toolkits do not require any
42+
# extension code, and can be used as long as the libraries are
43+
# installed on your system.
44+
#
45+
# You can uncomment any the following lines if you know you do
46+
# not want to use the GUI toolkit. Acceptible values are:
47+
# True: build the extension. Exits with a warning if the
48+
# required dependencies are not available
49+
# False: do not build the extension
50+
# auto: build if the required dependencies are available,
51+
# otherwise skip silently. This is the default
52+
# behavior
53+
#
54+
gtk = False
55+
gtkagg = False
56+
tkagg = True
57+
wxagg = False
58+
macosx = False
59+
60+
[rc_options]
61+
# User-configurable options
62+
#
63+
# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
64+
# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
65+
#
66+
# The Agg, Ps, Pdf and SVG backends do not require external
67+
# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg
68+
# if you have disabled the relevent extension modules. Agg will be used
69+
# by default.
70+
#
71+
backend = TkAgg
72+
#
73+
# The numerix module was historically used to provide
74+
# compatibility between the Numeric, numarray, and NumPy array
75+
# packages. Now that NumPy has emerge as the universal array
76+
# package for python, numerix is not really necessary and is
77+
# maintained to provide backward compatibility. Do not change
78+
# this unless you have a compelling reason to do so.
79+
#numerix = numpy

0 commit comments

Comments
 (0)