From: Werner F. B. <wer...@fr...> - 2007-06-16 14:38:58
|
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 |