On Monday 12 November 2007 05:52:55 pm John Hunter wrote: > 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
I was going to mask the NEWCONFIG stuff for the upcoming release, including providing the following packages: > ## 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: [...] > 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'] This is unrelated to the changes in the setup scripts. It looks like config.mplconfig has been changed. The section name now is mathtext, not text.math. It is not possible to autocreate the matplotlib.conf files at build time, without requiring configobj and enthought.traits as external dependencies. Instead, the developers should get in the habit of running mplconfig.py as a script whenever we make changes to mplconfig, in order to update the default config file (I just did so). This should also be done immediately before any release that includes the new config package. > 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/matpl >otlibrc When the config package encounters a matplotlibrc file but not a matplotlib.conf file, it reads the rc file and creates a .conf file. The message must have been printed during that process. > 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. Done. The last option is disabling compilation of the image extension module. Should that still be optional? Darren ------------------------------------------------------------------------- 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