Menu

[r168]: / trunk / matplotlib / setup.py  Maximize  Restore  History

Download this file

110 lines (87 with data), 3.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
"""
matplotlib has added some extension module code which can optionally
be built by setting the appropriate flag below.
"""
# build the freetype2 interface - this is required for mathtext
# Requires freetype2, and libz
BUILD_FT2FONT = 1
# Build the fonttools and TTFQuery packages, required by the Paint,
# Agg and GD backends.
BUILD_FONTTOOLS = 1
# Build the antigrain geometry toolkit. Agg makes heavy use of
# templates, so it probably requires a fairly recent compiler to build
# it. It makes very nice antialiased output and also supports alpha
# blending
BUILD_AGG = 1
# The builds below are alpha. They use an image backend (eg GD or
# Agg) to render to the GTK canvas. The idea is to could use a single
# high quality image renderer to render to all the GUI windows
# build GTK GUI with Agg renderer ; requires pygtk src distros installed
BUILD_GTKAGG = 1
# build GTK GUI with GD renderer ; requires pygtk and GD src distros installed
BUILD_GTKGD = 0
# build TK GUI with Agg renderer ; requires Tkinter Python extension
# and Tk includes
BUILD_TKAGG = 1
## You shouldn't need to customize below this point
from distutils.core import setup
import sys,os
import glob
from setupext import build_gtkgd, build_agg, build_fonttools, build_gtkagg, \
build_tkagg, build_ft2font
import distutils.sysconfig
data = []
data.extend(glob.glob('fonts/afm/*.afm'))
data.extend(glob.glob('fonts/ttf/*.ttf'))
data.extend(glob.glob('images/*.xpm'))
data.extend(glob.glob('images/*.ppm'))
data.append('.matplotlibrc')
data_files=[('share/matplotlib', data),]
ext_modules = []
packages = [
'matplotlib',
'matplotlib/backends',
]
if BUILD_GTKGD:
BUILD_FONTTOOLS = 1
build_gtkgd(ext_modules, packages)
if BUILD_GTKAGG:
BUILD_AGG = 1
build_gtkagg(ext_modules, packages)
if BUILD_TKAGG:
BUILD_AGG = 1
build_tkagg(ext_modules, packages)
if BUILD_AGG:
BUILD_FT2FONT = 1
build_agg(ext_modules, packages)
if BUILD_FT2FONT:
BUILD_FONTTOOLS = 1
build_ft2font(ext_modules, packages)
if BUILD_FONTTOOLS:
build_fonttools(ext_modules, packages)
# we need to manually install FontTools.pth since we can't use
# extra_path which puts all packages -- matplotlib, ttfquery and
# FontTools -- in the FontTools subdir
sitep = distutils.sysconfig.get_python_lib()
ind = sitep.rfind(distutils.sysconfig.PREFIX)
if ind>=0:
sitep = sitep[len(distutils.sysconfig.PREFIX) + len(os.sep):]
data_files.append( (sitep, ['FontTools.pth']) )
#print distutils.sysconfig.PREFIX, sitep, ind
setup(name="matplotlib",
version= '0.51e',
description = "Matlab style python plotting package",
author = "John D. Hunter",
author_email="jdhunter@ace.bsd.uchicago.edu",
url = "http://matplotlib.sourceforge.net",
long_description = """
matplotlib strives to produce publication quality 2D graphics
using matlab plotting for inspiration. Although the main lib is
object oriented, there is a functional matlab style interface
for people coming from matlab.
""",
packages = packages,
platforms='any',
ext_modules = ext_modules,
data_files = data_files,
)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.