Hi, matplotlib developer
You know there is a bug about get_py2exe_datafiles in MPL0.90.1. I think I fix
it below.
------------------------- matplotlib/__init__.py ------------------
def get_py2exe_datafiles():
datapath = get_data_path()
head, tail = os.path.split(datapath)
d = {}
for root, dirs, files in os.walk(datapath):
# Need to explicitly remove cocoa_agg files or py2exe complains
# NOTE I dont know why, but do as previous version
if 'Matplotlib.nib' in files:
files.remove('Matplotlib.nil')
files = [os.path.join(root, filename) for filename in files]
root = root.replace(tail, 'matplotlibdata')
root = root[root.index('matplotlibdata'):]
d[root] = files
return d.items()
----------------------------- end ---------------------------------
and the sample of setup.py is below:
----------------- setup.py sample -----------------------
from distutils.core import setup
import py2exe
import matplotlib
dist_dir = r'r:\matplotlib_dist_dir'
setup(
console=['simple_demo.py'],
options={
'py2exe': {
'packages' : ['matplotlib', 'pytz'],
'dist_dir': dist_dir
}
},
data_files=matplotlib.get_py2exe_datafiles()
)
it work well in my box.
-- Tocer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users