Revision: 7147
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7147&view=rev
Author: cmoad
Date: 2009-05-28 03:48:15 +0000 (Thu, 28 May 2009)
Log Message:
-----------
finished win32 release scripts
Modified Paths:
--------------
trunk/matplotlib/release/win32/Makefile
trunk/matplotlib/release/win32/data/setup.cfg
Added Paths:
-----------
trunk/matplotlib/release/win32/data/mingw_path.sh
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-05-28 03:24:27 UTC (rev
7146)
+++ trunk/matplotlib/release/win32/Makefile 2009-05-28 03:48:15 UTC (rev
7147)
@@ -1,26 +1,47 @@
-PYTHON=C:/Python26/python.exe
-SRCDIR=${PWD}
-ZLIBVERSION=1.2.3
-PNGVERSION=1.2.33
-FREETYPEVERSION=2.3.7
-MPLVERSION=0.98.5.3
+PYTHON = C:/Python26/python.exe
+SRCDIR = ${PWD} # autoconf needs this path
+WINSRCDIR = `${PWD}/data/mingw_path.sh ${PWD}` # distutils needs windows paths
+ZLIBVERSION = 1.2.3
+PNGVERSION = 1.2.33
+FREETYPEVERSION = 2.3.7
+#TCLTKVERSION = 8.4.19 # Before Python 2.6
+TCLTKVERSION = 8.5.7 # Python 2.6
+MPLVERSION = 0.98.6svn
## You shouldn't need to configure past this point
-CFLAGS="-Os -I${SRCDIR}/zlib-${ZLIBVERSION} -I${SRCDIR}/libpng-${PNGVERSION}
-I${SRCDIR}/freetype-${FREETYPEVERSION}/include"
+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
-LDFLAGS="-L${SRCDIR}/zlib-${ZLIBVERSION} -L${SRCDIR}/libpng-${PNGVERSION}
-L${SRCDIR}/freetype-${FREETYPEVERSION}"
+LDFLAGS = -L${SRCDIR}/zlib-${ZLIBVERSION}
+LDFLAGS += -L${SRCDIR}/libpng-${PNGVERSION}
+LDFLAGS += -L${SRCDIR}/freetype-${FREETYPEVERSION}s
+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"
+
+PY_LINKER =
"${WINSRCDIR}/zlib-${ZLIBVERSION};${WINSRCDIR}/libpng-${PNGVERSION};${WINSRCDIR}/freetype-${FREETYPEVERSION}"
+
clean:
rm -rf zlib-${ZLIBVERSION}.tar.gz libpng-${PNGVERSION}.tar.bz2 \
freetype-${FREETYPEVERSION}.tar.bz2 \
+ tcl${TCLTKVERSION}-src.tar.gz tk${TCLTKVERSION}-src.tar.gz \
zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION} \
+ tcl${TCLTKVERSION} tk${TCLTKVERSION} \
matplotlib-${MPLVERSION} *~
fetch_deps:
wget http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz
wget
http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-${PNGVERSION}.tar.bz2
wget
http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2
+ wget
http://prdownloads.sourceforge.net/tcl/tcl${TCLTKVERSION}-src.tar.gz
+ wget http://prdownloads.sourceforge.net/tcl/tk${TCLTKVERSION}-src.tar.gz
zlib:
rm -rf zlib-${ZLIBVERSION}
@@ -33,8 +54,8 @@
rm -rf libpng-${PNGVERSION}
tar xvfj libpng-${PNGVERSION}.tar.bz2
cd libpng-${PNGVERSION} &&\
- export CFLAGS=${CFLAGS} &&\
- export LDFLAGS=${LDFLAGS} &&\
+ export CFLAGS="${CFLAGS}" &&\
+ export LDFLAGS="${LDFLAGS}" &&\
./configure --disable-shared &&\
make -j3 &&\
cp .libs/libpng.a .
@@ -48,15 +69,21 @@
mingw32-make -j3 &&\
cp objs/libfreetype.a .
-dependencies: png freetype
+tcltk:
+ rm -rf tcl${TCLTKVERSION}
+ rm -rf tk${TCLTKVERSION}
+ tar xvfz tcl${TCLTKVERSION}-src.tar.gz
+ tar xvfz tk${TCLTKVERSION}-src.tar.gz
+dependencies: png freetype tcltk
+
installers:
rm -rf matplotlib-${MPLVERSION}
tar xvzf matplotlib-${MPLVERSION}.tar.gz
cd matplotlib-${MPLVERSION} &&\
rm -rf build &&\
- cp ../data/setup.cfg . &&\
- ${PYTHON} setup.py build -c mingw32 bdist_wininst &&\
- ${PYTHON} setupegg.py build -c mingw32 bdist_egg
+ cp ../data/setup*.* . &&\
+ ${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
all: fetch_deps dependencies installers
Added: trunk/matplotlib/release/win32/data/mingw_path.sh
===================================================================
--- trunk/matplotlib/release/win32/data/mingw_path.sh
(rev 0)
+++ trunk/matplotlib/release/win32/data/mingw_path.sh 2009-05-28 03:48:15 UTC
(rev 7147)
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# This script will convert a UNIX path to a Win32 native path
+UPATH=$1
+if test "$UPATH" = ""; then
+ echo EMPTY
+ exit 1
+fi
+#echo "INPUT IS \"$UPATH\"" >&2
+if [ -d "$UPATH" ]
+then
+ cd "$UPATH"
+ WPATH=`pwd -W`
+else
+ # cd up to parent directories until we find
+ # one that exists. Loop ends at "/".
+ dpart=`dirname "$UPATH"`
+ #echo "dpart starts as \"$dpart\"" >&2
+ while [ ! -d "$dpart" ]
+ do
+ dpart=`dirname "$dpart"`
+ #echo "dpart is \"$dpart\"" >&2
+ done
+ #echo "dpart ends as \"$dpart\"" >&2
+
+ if [ "$dpart" != "." ]
+ then
+ dstart=`expr length "$dpart"`
+ # If the last character in dpart is not "/",
+ # then advance dstart by one index. This
+ # avoids two dir seperators in the result.
+ last=`expr length "$dpart"`
+ last=`expr $last - 1`
+ last=${dpart:$last:1}
+ #echo "last is \"$last\"" >&2
+ if [ "$last" != "/" ]
+ then
+ dstart=`expr $dstart + 1`
+ fi
+ dend=`expr length "$UPATH"`
+ dlen=`expr $dend - $dstart`
+ #echo "UPATH is \"$UPATH\"" >&2
+ #echo "dstart is $dstart, dend is $dend, dlen is $dlen" >&2
+ bpart=${UPATH:$dstart:$dend}
+ dpart=`cd "$dpart" ; pwd -W`
+ #echo "dpart \"$dpart\"" >&2
+ #echo "bpart \"$bpart\"" >&2
+ else
+ dpart=`pwd -W`
+ bpart=$UPATH
+ fi
+ WPATH=${dpart}/${bpart}
+fi
+#echo "OUTPUT IS \"$WPATH\"" >&2
+echo $WPATH
+exit 0
+
Modified: trunk/matplotlib/release/win32/data/setup.cfg
===================================================================
--- trunk/matplotlib/release/win32/data/setup.cfg 2009-05-28 03:24:27 UTC
(rev 7146)
+++ trunk/matplotlib/release/win32/data/setup.cfg 2009-05-28 03:48:15 UTC
(rev 7147)
@@ -1,79 +1,79 @@
-# Rename this file to setup.cfg to modify matplotlib's
-# build options.
-
-[egg_info]
-tag_svn_revision = 1
-
-[status]
-# To suppress display of the dependencies and their versions
-# at the top of the build log, uncomment the following line:
-#suppress = True
-#
-# Uncomment to insert lots of diagnostic prints in extension code
-#verbose = True
-
-[provide_packages]
-# By default, matplotlib checks for a few dependencies and
-# installs them if missing. This feature can be turned off
-# by uncommenting the following lines. Acceptible values are:
-# True: install, overwrite an existing installation
-# False: do not install
-# auto: install only if the package is unavailable. This
-# is the default behavior
-#
-## Date/timezone support:
-pytz = True
-dateutil = True
-
-
-[gui_support]
-# Matplotlib supports multiple GUI toolkits, including Cocoa,
-# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of
-# these toolkits requires AGG, the Anti-Grain Geometry library,
-# which is provided by matplotlib and built by default.
-#
-# Some backends are written in pure Python, and others require
-# extension code to be compiled. By default, matplotlib checks
-# for these GUI toolkits during installation and, if present,
-# compiles the required extensions to support the toolkit. GTK
-# support requires the GTK runtime environment and PyGTK. Wx
-# support requires wxWidgets and wxPython. Tk support requires
-# Tk and Tkinter. The other GUI toolkits do not require any
-# extension code, and can be used as long as the libraries are
-# installed on your system.
-#
-# You can uncomment any the following lines if you know you do
-# not want to use the GUI toolkit. Acceptible values are:
-# True: build the extension. Exits with a warning if the
-# required dependencies are not available
-# False: do not build the extension
-# auto: build if the required dependencies are available,
-# otherwise skip silently. This is the default
-# behavior
-#
-gtk = False
-gtkagg = False
-tkagg = True
-wxagg = False
-macosx = False
-
-[rc_options]
-# User-configurable options
-#
-# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
-# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
-#
-# The Agg, Ps, Pdf and SVG backends do not require external
-# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg
-# if you have disabled the relevent extension modules. Agg will be used
-# by default.
-#
-backend = TkAgg
-#
-# The numerix module was historically used to provide
-# compatibility between the Numeric, numarray, and NumPy array
-# packages. Now that NumPy has emerge as the universal array
-# package for python, numerix is not really necessary and is
-# maintained to provide backward compatibility. Do not change
-# this unless you have a compelling reason to do so.
-#numerix = numpy
+# Rename this file to setup.cfg to modify matplotlib's
+# build options.
+
+[egg_info]
+tag_svn_revision = 0
+
+[status]
+# To suppress display of the dependencies and their versions
+# at the top of the build log, uncomment the following line:
+#suppress = True
+#
+# Uncomment to insert lots of diagnostic prints in extension code
+#verbose = True
+
+[provide_packages]
+# By default, matplotlib checks for a few dependencies and
+# installs them if missing. This feature can be turned off
+# by uncommenting the following lines. Acceptible values are:
+# True: install, overwrite an existing installation
+# False: do not install
+# auto: install only if the package is unavailable. This
+# is the default behavior
+#
+## Date/timezone support:
+pytz = True
+dateutil = True
+
+
+[gui_support]
+# Matplotlib supports multiple GUI toolkits, including Cocoa,
+# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of
+# these toolkits requires AGG, the Anti-Grain Geometry library,
+# which is provided by matplotlib and built by default.
+#
+# Some backends are written in pure Python, and others require
+# extension code to be compiled. By default, matplotlib checks
+# for these GUI toolkits during installation and, if present,
+# compiles the required extensions to support the toolkit. GTK
+# support requires the GTK runtime environment and PyGTK. Wx
+# support requires wxWidgets and wxPython. Tk support requires
+# Tk and Tkinter. The other GUI toolkits do not require any
+# extension code, and can be used as long as the libraries are
+# installed on your system.
+#
+# You can uncomment any the following lines if you know you do
+# not want to use the GUI toolkit. Acceptible values are:
+# True: build the extension. Exits with a warning if the
+# required dependencies are not available
+# False: do not build the extension
+# auto: build if the required dependencies are available,
+# otherwise skip silently. This is the default
+# behavior
+#
+gtk = False
+gtkagg = False
+tkagg = True
+wxagg = False
+macosx = False
+
+[rc_options]
+# User-configurable options
+#
+# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
+# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
+#
+# The Agg, Ps, Pdf and SVG backends do not require external
+# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg
+# if you have disabled the relevent extension modules. Agg will be used
+# by default.
+#
+backend = TkAgg
+#
+# The numerix module was historically used to provide
+# compatibility between the Numeric, numarray, and NumPy array
+# packages. Now that NumPy has emerge as the universal array
+# package for python, numerix is not really necessary and is
+# maintained to provide backward compatibility. Do not change
+# this unless you have a compelling reason to do so.
+#numerix = numpy
Added: trunk/matplotlib/release/win32/data/setupwin.py
===================================================================
--- trunk/matplotlib/release/win32/data/setupwin.py
(rev 0)
+++ trunk/matplotlib/release/win32/data/setupwin.py 2009-05-28 03:48:15 UTC
(rev 7147)
@@ -0,0 +1,17 @@
+from distutils import cygwinccompiler
+
+try:
+ # Python 2.6
+ # Replace the msvcr func to return an empty list
+ cygwinccompiler.get_msvcr
+ 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
+
+execfile('setup.py')
Added: trunk/matplotlib/release/win32/data/setupwinegg.py
===================================================================
--- trunk/matplotlib/release/win32/data/setupwinegg.py
(rev 0)
+++ trunk/matplotlib/release/win32/data/setupwinegg.py 2009-05-28 03:48:15 UTC
(rev 7147)
@@ -0,0 +1,20 @@
+from distutils import cygwinccompiler
+
+try:
+ # Python 2.6
+ # Replace the msvcr func to return an empty list
+ cygwinccompiler.get_msvcr
+ 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
+
+from setuptools import setup
+execfile('setup.py',
+ {'additional_params' :
+ {'namespace_packages' : ['mpl_toolkits']}})
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins