Skip to content

Commit cb1b1f7

Browse files
committed
made agg deps explicity in setup
svn path=/trunk/matplotlib/; revision=1065
1 parent 931df40 commit cb1b1f7

File tree

7 files changed

+33
-15
lines changed

7 files changed

+33
-15
lines changed

TODO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
640640
show()
641641

642642

643-
-- fix contour mappable to work under changes in clim, cmap
643+
-- DONE fix contour mappable to work under changes in clim, cmap
644644

645645
-- DONE make subplot delaxes on other subplots under it.
646646

@@ -662,5 +662,5 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
662662

663663
-- add gc warning to oo agg and FAQ
664664

665-
-- check why lowest contour is not labeled in contour_demo2 and why
665+
-- DONE check why lowest contour is not labeled in contour_demo2 and why
666666
the colormap is still not applying to the contour.

lib/matplotlib/contour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def clabel(self, *args, **kwargs):
162162
self.ax.add_artist(label)
163163

164164

165-
if hasattr(contours, 'mappable'):
166-
old = getattr(contours, 'mappable')
165+
old = getattr(contours, 'mappable')
166+
if old is not None:
167167
mappable = ContourMappable(old.get_array(), toadd, cmap=old.cmap, labeld=self.labeld)
168168
mappable.set_array(old.get_array())
169169
mappable.autoscale()

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
if home is not None:
7878
# user fonts on OSX
7979
path = os.path.join(home, 'Library', 'Fonts')
80-
X11FontDirectories.append(home)
80+
X11FontDirectories.append(path)
8181

8282
def win32FontDirectory():
8383
"""Return the user-specified font directory for Win32."""

lib/matplotlib/lines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from cbook import iterable, is_string_like
1818
from colors import colorConverter
1919
from patches import bbox_artist
20-
from path import MOVETO, LINETO, ENDPOLY
20+
2121
from transforms import lbwh_to_bbox, LOG10
2222
from matplotlib import rcParams
2323

setupext.py

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,20 @@ def build_tkagg(ext_modules, packages, numerix):
381381
def 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

src/_backend_agg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ RendererAgg::~RendererAgg() {
17991799
delete pixFmt;
18001800
delete renderingBuffer;
18011801
delete [] pixBuffer;
1802-
1802+
18031803
}
18041804

18051805
/* ------------ module methods ------------- */

src/_image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "util/agg_color_conv_rgb8.h"
3030
#include "_image.h"
3131
#include "mplutils.h"
32-
32+
3333

3434

3535
typedef agg::pixel_formats_rgba32<agg::order_rgba32> pixfmt;

0 commit comments

Comments
 (0)