@@ -486,55 +486,59 @@ def build_tkagg(ext_modules, packages, numerix):
486486
487487
488488def build_wxagg (ext_modules , packages , numerix , abortOnFailure ):
489- global BUILT_WXAGG
490- if BUILT_WXAGG :
491- return
489+ global BUILT_WXAGG
490+ if BUILT_WXAGG :
491+ return
492492
493- wxconfig = find_wx_config ()
493+ wxconfig = find_wx_config ()
494494
495- # Avoid aborting the whole build process if `wx-config' can't be found and
496- # BUILD_WXAGG in setup.py is set to "auto"
497- if wxconfig is None :
498- print 'WXAgg\' s accelerator requires `wx-config\' .'
495+ # Avoid aborting the whole build process if `wx-config' can't be found and
496+ # BUILD_WXAGG in setup.py is set to "auto"
497+ if wxconfig is None :
498+ print """
499+ WXAgg's accelerator requires `wx-config'.
499500
500- if not abortOnFailure :
501- BUILT_WXAGG = True
502- return
503- else :
504- print '''\n \
505- The `wx-config\' executable could not be located in any directory of the PATH
506- environment variable. If it is in some other location or has some other name,
507- set the WX_CONFIG environment variable to the full path of the execuatable.'''
508- sys .exit (1 )
509- elif not check_wxpython_headers (wxconfig ):
510- print 'WXAgg\' s accelerator requires the wxPython headers.'
511-
512- if not abortOnFailure :
513- BUILT_WXAGG = True
514- return
515- else :
516- print '''\n \
517- The wxPython header files could not be located in any of the standard include
518- directories or include directories reported by `wx-config --cppflags'.'''
519- sys .exit (1 )
501+ The `wx-config\' executable could not be located in any directory of the
502+ PATH environment variable. If you want to build WXAgg, and wx-config is
503+ in some other location or has some other name, set the WX_CONFIG
504+ environment variable to the full path of the executable like so:
520505
521- deps = ['src/_wxagg.cpp' , 'src/mplutils.cpp' ]#, 'src/_transforms.cpp']
522- deps .extend (glob .glob ('CXX/*.cxx' ))
523- deps .extend (glob .glob ('CXX/*.c' ))
506+ export WX_CONFIG=/usr/lib/wxPython-2.6.1.0-gtk2-unicode/bin/wx-config
507+ """
508+ if not abortOnFailure :
509+ print """Building MPL without wxAgg"""
510+ BUILT_WXAGG = True
511+ return
512+ else :
513+ sys .exit (1 )
514+ elif not check_wxpython_headers (wxconfig ):
515+ print 'WXAgg\' s accelerator requires the wxPython headers.'
524516
525- module = Extension ('matplotlib.backends._wxagg' , deps )
517+ if not abortOnFailure :
518+ BUILT_WXAGG = True
519+ return
520+ else :
521+ print """
522+ The wxPython header files could not be located in any of the standard
523+ include
524+ directories or include directories reported by `wx-config --cppflags'."""
525+ sys .exit (1 )
526526
527- # wxagg implicitly needs the scipy flags when targetting
528- # scipy because of src/_transforms.c
529- if 'scipy' in numerix :
530- add_scipy_flags (module )
531527
532- add_agg_flags (module )
533- add_ft2font_flags (module )
534- add_wx_flags (module , wxconfig )
528+ deps = ['src/_wxagg.cpp' , 'src/mplutils.cpp' ]
529+ deps .extend (glob .glob ('CXX/*.cxx' ))
530+ deps .extend (glob .glob ('CXX/*.c' ))
531+
532+ module = Extension ('matplotlib.backends._wxagg' , deps )
533+
534+ add_agg_flags (module )
535+ add_ft2font_flags (module )
536+ add_wx_flags (module , wxconfig )
537+
538+ ext_modules .append (module )
539+ BUILT_WXAGG = True
540+
535541
536- ext_modules .append (module )
537- BUILT_WXAGG = True
538542
539543
540544def build_agg (ext_modules , packages , numerix ):
0 commit comments