@@ -381,10 +381,20 @@ def build_tkagg(ext_modules, packages, numerix):
381381def build_agg (ext_modules , packages , numerix ):
382382 global BUILT_AGG
383383 if BUILT_AGG : return # only build it if you you haven't already
384-
384+
385+
386+ agg = ('agg_trans_affine.cpp' ,
387+ 'agg_path_storage.cpp' ,
388+ 'agg_vcgen_stroke.cpp' ,
389+ 'agg_bezier_arc.cpp' ,
390+ 'agg_curves.cpp' ,
391+ 'agg_vcgen_dash.cpp' ,
392+ 'agg_rasterizer_scanline_aa.cpp' ,
393+ )
394+
385395 if numerix in ["numarray" ,"both" ]: # Build for numarray
386- deps = ['src/ft2font.cpp' , ' src/mplutils.cpp' ]
387- deps .extend (glob . glob ( 'agg22/ src/* .cpp' ))
396+ deps = ['agg22/ src/%s' % name for name in agg ]
397+ deps .extend (( 'src/ft2font.cpp' , ' src/mplutils .cpp' ))
388398 deps .extend (glob .glob ('CXX/*.cxx' ))
389399 deps .extend (glob .glob ('CXX/*.c' ))
390400 temp_copy ('src/_backend_agg.cpp' , 'src/_na_backend_agg.cpp' )
@@ -399,8 +409,8 @@ def build_agg(ext_modules, packages, numerix):
399409 add_ft2font_flags (module )
400410 ext_modules .append (module )
401411 if numerix in ["Numeric" ,"both" ]: # Build for Numeric
402- deps = ['src/ft2font.cpp' , ' src/mplutils.cpp' ]
403- deps .extend (glob . glob ( 'agg22/ src/* .cpp' ))
412+ deps = ['agg22/ src/%s' % name for name in agg ]
413+ deps .extend (( 'src/ft2font.cpp' , ' src/mplutils .cpp' ))
404414 deps .extend (glob .glob ('CXX/*.cxx' ))
405415 deps .extend (glob .glob ('CXX/*.c' ))
406416
@@ -423,10 +433,17 @@ def build_image(ext_modules, packages, numerix):
423433 global BUILT_IMAGE
424434 if BUILT_IMAGE : return # only build it if you you haven't already
425435
436+ agg = ('agg_trans_affine.cpp' ,
437+ 'agg_path_storage.cpp' ,
438+ 'agg_rasterizer_scanline_aa.cpp' ,
439+ 'agg_image_filters.cpp' ,
440+ 'agg_bezier_arc.cpp' ,
441+ )
442+
426443 if numerix in ["numarray" ,"both" ]: # Build for numarray
427444 temp_copy ('src/_image.cpp' , 'src/_na_image.cpp' )
428445 deps = ['src/_na_image.cpp' , 'src/mplutils.cpp' ]
429- deps .extend (glob . glob ( 'agg22/src/*.cpp' ) )
446+ deps .extend ([ 'agg22/src/%s' % name for name in agg ] )
430447 deps .extend (glob .glob ('CXX/*.cxx' ))
431448 deps .extend (glob .glob ('CXX/*.c' ))
432449 module = Extension (
@@ -441,9 +458,10 @@ def build_image(ext_modules, packages, numerix):
441458 if numerix in ["Numeric" ,"both" ]: # Build for Numeric
442459 temp_copy ('src/_image.cpp' , 'src/_nc_image.cpp' )
443460 deps = ['src/_nc_image.cpp' , 'src/mplutils.cpp' ]
444- deps .extend (glob . glob ( 'agg22/src/*.cpp' ) )
461+ deps .extend ([ 'agg22/src/%s' % name for name in agg ] )
445462 deps .extend (glob .glob ('CXX/*.cxx' ))
446463 deps .extend (glob .glob ('CXX/*.c' ))
464+
447465 module = Extension (
448466 'matplotlib._nc_image' ,
449467 deps
0 commit comments