Hi Viray,

Viraj Vajratkar wrote:
> ...
> well i run "python setup.py py2exe" in the console but it finally 
> gives : "error: can't copy 
> 'F:\Python25\Lib\site-packages\matplotlib\mpl-data\fonts' : does'nt 
> exist or not a regular file" (when actually there is a directory 
> called mpl-data which has 3 subdirectories ... afm, pdfcorefonts and 
> ttf). Build and dist folders are made but thr is no .exe in dist.
> so i used this setup :
The following works for me on WinXP , 2000 and Vista with matplotlib 0.90.1:

# matplotlib data
import matplotlib as mp
matplotlib_font_afm = glob.glob(os.sep.join([mp.get_data_path(), 
'fonts/afm/*']))
matplotlib_font_pdfcorefonts = 
glob.glob(os.sep.join([mp.get_data_path(), 'fonts/pdfcorefonts/*']))
matplotlib_font_ttf = glob.glob(os.sep.join([mp.get_data_path(), 
'fonts/ttf/*']))
matplotlib_images = glob.glob(os.sep.join([mp.get_data_path(), 'images/*']))
...

      data_files = [
...
                    ("lib\\matplotlibdata", 
[os.sep.join([mp.get_data_path(), 'matplotlibrc'])]),
                    ("lib\\matplotlibdata\\fonts\\afm", 
matplotlib_font_afm),
                    ("lib\\matplotlibdata\\fonts\\pdfcorefonts", 
matplotlib_font_pdfcorefonts),
                    ("lib\\matplotlibdata\\fonts\\ttf", 
matplotlib_font_ttf),
                    ("lib\\matplotlibdata\\images", matplotlib_images),
                    ]


Hope this helps
Werner

-------------------------------------------------------------------------
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to