Exemplo n.º 1
0
has_libpng = check_for_libpng()

if has_libpng and options['build_agg']:
    build_agg(ext_modules, packages)
    rc['backend'] = 'Agg'
else:
    rc['backend'] = 'SVG'

if has_libpng and options['build_image']:
    build_image(ext_modules, packages)

if has_libpng and options['build_agg'] or options['build_image']:
    build_png(ext_modules, packages)

if options['build_windowing'] and sys.platform == 'win32':
    build_windowing(ext_modules, packages)

# the options can be True, False, or 'auto'. If True, try to build
# regardless of the lack of dependencies. If auto, silently skip
# when dependencies are missing.
if options['build_tkagg']:
    if check_for_tk() or (options['build_tkagg'] is True):
        options['build_agg'] = 1
        build_tkagg(ext_modules, packages)
        rc['backend'] = 'TkAgg'

if options['build_wxagg']:
    if check_for_wx() or (options['build_wxagg'] is True):
        options['build_agg'] = 1
        import wx
        if getattr(wx, '__version__', '0.0')[0:3] < '2.8':
Exemplo n.º 2
0
if BUILD_GTKAGG:
    BUILD_AGG = 1
    build_gtkagg(ext_modules, packages, NUMERIX)
    rc["backend"] = "GTKAgg"

if BUILD_AGG:
    build_agg(ext_modules, packages, NUMERIX)
    if rc["backend"] == "PS":
        rc["backend"] = "Agg"


if BUILD_FT2FONT:
    build_ft2font(ext_modules, packages)

if BUILD_WINDOWING and sys.platform == "win32":
    build_windowing(ext_modules, packages)

if BUILD_IMAGE:
    build_image(ext_modules, packages, NUMERIX)

if 1:  # I don't think we need to make these optional
    build_contour(ext_modules, packages, NUMERIX)

for mod in ext_modules:
    if VERBOSE:
        mod.extra_compile_args.append("-DVERBOSE")


# packagers: set rc['numerix'] and rc['backend'] here to override the auto
# defaults, eg
# rc['numerix'] = numpy