From: Werner F. B. <wer...@fr...> - 2005-04-11 17:55:51
|
Hi John, I took your zip file and changed the simple_plot_agg sample to just this and it looks like it works: data = glob.glob(r'C:\Python24\share\matplotlib\*') #data.append(r'C:\Enthon23\share\matplotlib\.matplotlibrc') setup(console=["simple_plot.py"], data_files=[("matplotlibdata",data)], options = {"py2exe": {"compressed": 1, # optimize may break pylab docstring handling #"optimize": 2, #"includes": includes, #"excludes": excludes, "packages": ["encodings", "pytz"], }}, ) Note that I use "packages" and NOT include, all the matplotlib and numeric stuff seems to get detected correctly by py2exe. The excludes don't seem to make a difference, I think py2exe removes them now by itself. Only error/warnings I get is that I did not include an .matplotlibrc file. Could you send me yours? By doing this I found a few more oversights (wx to wx.) in backend, updated version is attached. See you Werner John Hunter wrote: >>>>>>"andrea" == andrea gavana <and...@ti...> writes: > > > andrea> I still get the TimeZone error... > > I spent a little time looking at this this morning. I found that I > needed to explicitly put the utc timezone in my script that I was > freezing, it was not enough to include it in my includes list. Oddly, > this was not consistent. In the simple_plot_wxagg example, I had the > timezone info in my includes list only and it worked w/o incident. In > the simple_plot_gtk example, I needed to manually add > > import pytz.zoneinfo.UTC > > to my simple_plot.py script. Strange... > > Also, what kinds of files should be in the includes list? For example, > in Michael's list, he includes > > "matplotlib._na_image", > "matplotlib._na_transforms", > "matplotlib._nc_image", > "matplotlib._nc_transforms", > > > but not > > "matplotlib._image" > "matplotlib._transforms" > > The latter two are python files, the former extension code. Do you > typically need to manually point py2exe to the extension files? > > Anyway, the wxagg and gtk examples in the updated > http://matplotlib.sourceforge.net/py2exe_examples.zip build and run on > my machine. They are a bit of a hack in that I don't really > understand why/how/when the includes work. If someone can rationalize > these scripts, improve them, extend them, whatever, send the updates > my way. > > JDH > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click |