2323 If you are sufficiently masochistic that you want to build this
2424 yourself, contact me and I'll send you win32_static as a zip file.
2525
26- python setup.py build --compiler=mingw32 bdist_wininst --install-script postinstall.py > build23.out
26+ > python setup.py build --compiler=mingw32 bdist_wininst --install-script postinstall.py > build23.out
2727
2828"""
2929
4949
5050BUILT_AGG = False
5151BUILT_FONTTOOLS = False
52- BUILT_GTKGD = False
52+ BUILT_FT2FONT = False
5353BUILT_GTKAGG = False
54+ BUILT_GTKGD = False
55+ BUILT_IMAGE = False
5456BUILT_TKAGG = False
55- BUILT_FT2FONT = False
5657
5758def getoutput (s ):
5859 'get the output of a system command'
@@ -67,8 +68,6 @@ def add_agg_flags(module):
6768 # before adding the freetype flags since -z comes later
6869 module .libraries .append ('png' )
6970
70- add_ft2font_flags (module )
71-
7271 module .include_dirs .extend (['src' ,'agg2/include' ])
7372
7473 # put these later for correct link order
@@ -181,7 +180,8 @@ def build_gtkagg(ext_modules, packages):
181180
182181 # add agg flags before pygtk because agg only supports freetype1
183182 # and pygtk includes freetype2. This is a bit fragile.
184-
183+
184+ add_ft2font_flags (module )
185185 add_agg_flags (module )
186186 add_pygtk_flags (module )
187187
@@ -201,7 +201,9 @@ def build_tkagg(ext_modules, packages):
201201 # add agg flags before pygtk because agg only supports freetype1
202202 # and pygtk includes freetype2. This is a bit fragile.
203203
204+
204205 add_tk_flags (module ) # do this first
206+ add_ft2font_flags (module )
205207 add_agg_flags (module )
206208
207209
@@ -221,9 +223,26 @@ def build_agg(ext_modules, packages):
221223 deps
222224 ,
223225 )
226+ add_ft2font_flags (module )
224227 add_agg_flags (module )
225228 ext_modules .append (module )
226229 BUILT_AGG = True
230+
231+ def build_image (ext_modules , packages ):
232+ global BUILT_IMAGE
233+ if BUILT_IMAGE : return # only build it if you you haven't already
234+
235+ deps = ['src/image.cpp' ]
236+ deps .extend (glob .glob ('agg2/src/*.cpp' ))
237+
238+ module = Extension (
239+ 'matplotlib.image' ,
240+ deps
241+ ,
242+ )
243+ add_agg_flags (module )
244+ ext_modules .append (module )
245+ BUILT_IMAGE = True
227246
228247def build_fonttools (ext_modules , packages ):
229248
0 commit comments