Revision: 7307
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7307&view=rev
Author: evilguru
Date: 2009-07-29 21:28:50 +0000 (Wed, 29 Jul 2009)
Log Message:
-----------
Add first attempt at getting matplotlib to install mathtex.
Modified Paths:
--------------
branches/mathtex/setup.py
branches/mathtex/setupext.py
Modified: branches/mathtex/setup.py
===================================================================
--- branches/mathtex/setup.py 2009-07-29 17:14:05 UTC (rev 7306)
+++ branches/mathtex/setup.py 2009-07-29 21:28:50 UTC (rev 7307)
@@ -42,7 +42,8 @@
check_for_qt, check_for_qt4, check_for_cairo, \
check_provide_pytz, check_provide_dateutil,\
check_for_dvipng, check_for_ghostscript, check_for_latex, \
- check_for_pdftops, check_for_datetime, options, build_png
+ check_for_pdftops, check_for_datetime, options, build_png, \
+ check_provide_mathtex, build_mathtex
#import distutils.sysconfig
# jdh
@@ -128,6 +129,9 @@
if has_libpng and options['build_agg'] or options['build_image']:
build_png(ext_modules, packages)
+if has_libpng and options['provide_mathtex'] and check_provide_mathtex():
+ build_mathtex(ext_modules, packages, package_data)
+
if options['build_windowing'] and sys.platform=='win32':
build_windowing(ext_modules, packages)
Modified: branches/mathtex/setupext.py
===================================================================
--- branches/mathtex/setupext.py 2009-07-29 17:14:05 UTC (rev 7306)
+++ branches/mathtex/setupext.py 2009-07-29 21:28:50 UTC (rev 7307)
@@ -98,6 +98,7 @@
'verbose': False,
'provide_pytz': 'auto',
'provide_dateutil': 'auto',
+ 'provide_mathtex' : 'auto',
'build_agg': True,
'build_gtk': 'auto',
'build_gtkagg': 'auto',
@@ -126,6 +127,10 @@
"dateutil")
except: options['provide_dateutil'] = 'auto'
+ try: options['provide_mathtex'] = config.getboolean("provide_packages",
+ "mathtex")
+ except: options['provide_mathtex'] = 'auto'
+
try: options['build_gtk'] = config.getboolean("gui_support", "gtk")
except: options['build_gtk'] = 'auto'
@@ -386,6 +391,14 @@
print_status("datetime", "present, version unknown")
return True
+def check_provide_mathtex():
+ try:
+ import mathtex
+ except ImportError:
+ print_status("mathtex", "matplotlib will provide")
+ return True
+ return False
+
def check_provide_pytz(hasdatetime=True):
if hasdatetime and (options['provide_pytz'] is True):
print_status("pytz", "matplotlib will provide")
@@ -545,7 +558,7 @@
else:
add_base_flags(module)
module.libraries.append('z')
-
+
# put this last for library link order
module.libraries.extend(std_libs)
@@ -1092,6 +1105,11 @@
ext_modules.append(module)
BUILT_FT2FONT = True
+def build_mathtex(ext_modules, packages, package_data):
+ packages.append('mathtex/mathtex')
+ packages.append('mathtex/mathtex.backends')
+ package_data['mathtex'] = ['lib/mathtex/data/fonts/*.ttf']
+
def build_ttconv(ext_modules, packages):
global BUILT_TTCONV
if BUILT_TTCONV: return # only build it if you you haven't already
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins