matplotlib py2exe problem

Please be kind…poor starving newbie.

I’ve seen this question posted around but can’t seem to find an answer: does anybody have experience creating an .exe for a matplotlib program using py2exe?

My testMPL.py application is all set to go, but when I run py2exe with the suggested setup.py file, I get errors. (I’m using ActiveState Python 2.4.2
Build 10)

Setup.py is as follows:

from distutils.core import setup
import glob
import py2exe

opts = {

‘py2exe’: { ‘includes’: ‘matplotlib.numerix.random_array’,
‘excludes’: [’_gtkagg’, ‘_tkagg’],
‘dll_excludes’: [‘libgdk-win32-2.0-0.dll’,
‘libgobject-2.0-0.dll’]
}
}

data = glob.glob(“C:\Python24\Lib\site-packages\matplotlib\*”)
data.append(“C:\Python24\Lib\site-packages\matplotlib\matplotlibrc”)

setup ( console = [“testWX.py”],
data_files=[(“matplotlibdata”,data)])

Now, when I run this, setup.py ends with an error as follows:

*** copy extensions ***
*** copy dlls ***
*** copy data files ***
error: can’t copy ‘C:\Python24\Lib\site-packages\matplotlib\backends’: doesn’t e
xist or not a regular file

Is this error because glob can’t load files recursively? I get confused because all of the other examples out there use a different file structure, loading matplotlib files like so…

data_files = [(r’matplotlibdata’, glob.glob(r’c:\python24\share\matplotlib*’)),
(r’matplotlibdata’, [r’c:\python24\share\matplotlib.matplotlibrc’])],


But my python build doesn't have a /share  directory at all. Why the discrepency?

Thanks for any help...

- Daniel

<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

=====================================

Daniel McQuillen,
Oakland, CA

[www.bluepattern.com](http://www.bluepattern.com)

</details>