Revision: 7344
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7344&view=rev
Author: mdboom
Date: 2009-08-04 13:11:35 +0000 (Tue, 04 Aug 2009)
Log Message:
-----------
Build mathtex as part of matplotlib's build
Modified Paths:
--------------
branches/mathtex/setup.py
branches/mathtex/setupext.py
Modified: branches/mathtex/setup.py
===================================================================
--- branches/mathtex/setup.py 2009-08-04 11:50:09 UTC (rev 7343)
+++ branches/mathtex/setup.py 2009-08-04 13:11:35 UTC (rev 7344)
@@ -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_for_mathtex
#import distutils.sysconfig
# jdh
@@ -64,6 +65,7 @@
'matplotlib.numerix.fft',
]
+package_dir = {'': 'lib'}
py_modules = ['pylab']
@@ -214,6 +216,11 @@
print 'adding pytz'
if provide_dateutil: add_dateutil()
+# Add installation of mathtex
+if not check_for_mathtex():
+ package_dir['mathtex'] = 'lib/mathtex/mathtex'
+ packages.append('mathtex')
+
print_raw("")
print_raw("OPTIONAL USETEX DEPENDENCIES")
check_for_dvipng()
@@ -243,6 +250,7 @@
if options['verbose']:
mod.extra_compile_args.append('-DVERBOSE')
+
print 'pymods', py_modules
print 'packages', packages
distrib = setup(name="matplotlib",
@@ -262,7 +270,7 @@
platforms='any',
py_modules = py_modules,
ext_modules = ext_modules,
- package_dir = {'': 'lib'},
+ package_dir = package_dir,
package_data = package_data,
**additional_params
)
Modified: branches/mathtex/setupext.py
===================================================================
--- branches/mathtex/setupext.py 2009-08-04 11:50:09 UTC (rev 7343)
+++ branches/mathtex/setupext.py 2009-08-04 13:11:35 UTC (rev 7344)
@@ -106,7 +106,8 @@
'build_macosx': 'auto',
'build_image': True,
'build_windowing': True,
- 'backend': None}
+ 'backend': None,
+ 'provide_mathtex': True}
# Based on the contents of setup.cfg, determine the build options
if os.path.exists("setup.cfg"):
@@ -144,6 +145,8 @@
try: options['backend'] = config.get("rc_options", "backend")
except: pass
+ try: options['provide_mathtex'] = config.getboolean("provide_packages",
"mathtex")
+ except: options['provide_mathtex'] = True
if options['display_status']:
def print_line(char='='):
@@ -545,7 +548,7 @@
else:
add_base_flags(module)
module.libraries.append('z')
-
+
# put this last for library link order
module.libraries.extend(std_libs)
@@ -1376,3 +1379,17 @@
BUILT_GDK = True
+def check_for_mathtex():
+ if options['provide_mathtex'] is True:
+ print_status("mathtex", "matplotlib will provide")
+ return False
+ try:
+ import mathtex
+ except ImportError:
+ print_status("mathtex", "no")
+ return False
+ else:
+ from mathtex import __version__
+ print_status("mathtex", "present, version %s" % __version__)
+ return True
+
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