On Nov 12, 2007 4:09 PM, Darren Dale <[EMAIL PROTECTED]> wrote:

> I have been updating the logic in our setup.py and setupext.py files, so all
> of the build options are now exposed in setup.cfg. This should make it easier
> for anyone wishing to distribute matplotlib, like package managers. See
> setup.cfg.template for the details.

I just did a clean build and it went through -- a good start!  I tried
enabling the new config with by setting NEWCONFIG = True in
__init__.py, and also enabled in setup.cfg

## Experimental config package support:
enthought.traits = True
configobj = True

I pulled my matplotlibrc file from ~/.matplotlib and dropped in a copy
of site-packages/matplotlib/mpl-data/matplotlib.conf into
~/.matplotlib, and then tried to run simple_plot.py with
--verbose-helpful.  Here is the error I got:

[EMAIL PROTECTED]:examples> python simple_plot.py --verbose-helpful
$HOME=/home/titan/johnh
CONFIGDIR=/home/titan/johnh/.matplotlib
matplotlib data path
/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mpl-data
loaded rc file 
/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc
$HOME=/home/titan/johnh
CONFIGDIR=/home/titan/johnh/.matplotlib
matplotlib data path
/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mpl-data
loaded rc file 
/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc
Traceback (most recent call last):
  File "simple_plot.py", line 6, in ?
    from pylab import *
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/pylab.py",
line 1, in ?
    from matplotlib.pylab import *
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/__init__.py",
line 714, in ?
    from config import rcParams, rcdefaults
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/config/__init__.py",
line 10, in ?    from mplconfig import rcParams, mplConfig,
save_config, rcdefaults
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/config/mplconfig.py",
line 488, in ?
    filePriority=True)
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/config/tconfig.py",
line 561, in __init__
    self.tconf = configClass(self.fconfCombined,monitor=monitor)
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/config/tconfig.py",
line 425, in __init__
    section = v(sec_config,self,monitor=monitor)
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/config/tconfig.py",
line 400, in __init__
    raise TConfigInvalidKeyError(m)
matplotlib.config.tconfig.TConfigInvalidKeyError: In config defined in
file: '/home/titan/johnh/.matplotlib/matplotlib.conf'
Error processing section: text
These subsections are invalid : ['math']
Valid subsection names        : ['latex']


I am attaching my setup.cfg as well as ~/.matplotlib/matplotlib.conf.
I haven't made any changes to the [text] section that I know of....

Note there is also the somewhat confusing line in the verbose output

loaded rc file 
/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc

Thoughts?

One other minor suggestion: you probably want to include the VERBOSE
setting from setup.py in the cfg file.  One of the things we want to
get to here is to allow developers to tweak their local config w/o
risking compromising the svn repository.  I am frequently guilty of
this: I may tweak some variable in setup.py to get the build I need,
and then forget to unset it when I commit.  If everything in the build
is configurable from a file that doesn't live in svn, we won't have
this problem.  In the same vein, if you can make setup.cfg handle the
NEWCONFIG setting, this would be ideal.  I realize this is tricky
because at runtime you don't know which config file to read until you
have your config, so don't worry about it if it is too tricky.  One
possibility while we are in development testing phase would be assume
NEWCONFIG if ~/.matplotlib/matplotlib.conf exists.

JDH



JDH

Attachment: matplotlib.conf
Description: Binary data

Attachment: setup.cfg
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to