Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c2bfae

Browse files
committed
adding support for win32 _wxagg module
svn path=/trunk/matplotlib/; revision=1935
1 parent 7733d46 commit 8c2bfae

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

setupext.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
'linux2' : ['/usr/local', '/usr',],
3939
'linux' : ['/usr/local', '/usr',],
4040
'cygwin' : ['/usr/local', '/usr',],
41-
# Charles Moad recommends not putting in /usr/X11R6 for darwin
42-
# because freetype in this dir is too old for mpl
4341
'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
4442
'/usr', '/sw'],
4543
'freebsd4' : ['/usr/local', '/usr'],
@@ -253,6 +251,10 @@ def add_wx_flags(module, wxconfig):
253251
"""
254252
Add the module flags to build extensions which use wxPython.
255253
"""
254+
255+
if sys.platform == 'win32': # just added manually
256+
module.libraries.extend(['wxmsw26', 'wxpng', 'wxregex', 'wxzlib', 'wxexpat', 'wxjpeg', 'wxtiff'])
257+
return
256258

257259
def getWX(fmt, *args):
258260
return getoutput(wxconfig + ' ' + (fmt % args)).split()
@@ -494,7 +496,10 @@ def build_wxagg(ext_modules, packages, numerix, abortOnFailure):
494496

495497
# Avoid aborting the whole build process if `wx-config' can't be found and
496498
# BUILD_WXAGG in setup.py is set to "auto"
497-
if wxconfig is None:
499+
if sys.platform == 'win32':
500+
pass # don't need config
501+
502+
elif wxconfig is None:
498503
print """
499504
WXAgg's accelerator requires `wx-config'.
500505

0 commit comments

Comments
 (0)