On Mon, Dec 15, 2008 at 9:45 AM, Alexander Chemeris <alexander.cheme...@gmail.com> wrote:
> I experience the same problem. Full shell session (of one > command ;) is following: > > ~$ sudo easy_install matplotlib > Searching for matplotlib > Reading http://pypi.python.org/simple/matplotlib/ > Reading http://matplotlib.sourceforge.net > Reading > https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194 > Reading > https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474 > Reading http://sourceforge.net/project/showfiles.php?group_id=80706 > Best match: matplotlib 0.98.5 > Downloading > http://downloads.sourceforge.net/matplotlib/matplotlib-0.98.5.tar.gz?modtime=1229034572&big_mirror=0 > Processing matplotlib-0.98.5.tar.gz > Running matplotlib-0.98.5/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-fpPLdN/matplotlib-0.98.5/egg-dist-tmp-0LZ25S > ...snip > error: lib/matplotlib/mpl-data/matplotlib.conf.template: No such file or > directory > Exception exceptions.OSError: (2, 'No such file or directory', > 'src/image.cpp') in <bound method CleanUpFile.__del__ of > <setupext.CleanUpFile instance at 0x2fd7d40>> ignored > Exception exceptions.OSError: (2, 'No such file or directory', > 'src/path.cpp') in <bound method CleanUpFile.__del__ of > <setupext.CleanUpFile instance at 0x2fd7200>> ignored > Exception exceptions.OSError: (2, 'No such file or directory', > 'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of > <setupext.CleanUpFile instance at 0x2fd7b90>> ignored I can replicate it too, and I think I am getting some insight into what is going on and it may point to a distutils and/or easy_install bug (but one we can work around). The file in question is matplotlib.conf.template, which exists in lib/matplotlib/mpl-data. There is a symlink in doc/mpl_data which points to lib/matplotlib/mpl-data. Eg in the mpl src tree:: jdhun...@bic128:mpl> ls -ld lib/matplotlib/mpl-data/ doc/mpl_data lrwxrwxrwx 1 jdhunter jdhunter 27 Jun 2 2008 doc/mpl_data -> ../lib/matplotlib/mpl-data/ drwxrwxr-x 6 jdhunter jdhunter 4096 Dec 10 13:09 lib/matplotlib/mpl-data/ Now create the sdist:: jdhun...@bic128:mpl> python setup.py sdist > sdist.out jdhun...@bic128:mpl> grep matplotlib.conf.template sdist.out hard linking doc/mpl_data/matplotlib.conf.template -> matplotlib-0.98.5/doc/mpl_data hard linking lib/matplotlib/mpl-data/matplotlib.conf.template -> matplotlib-0.98.5/lib/matplotlib/mpl-data If we create an sdist, the symlink is backwards: the tarball says lib/matplotlib/mpl-data/matplotlib.conf.template links to doc/mpl_data/matplotlib.conf.template and has zero content jdhun...@bic128:tmp> tar tvfz matplotlib-0.98.5.tar.gz |grep matplotlib.conf.template -rw-r--r-- cmoad/staff 13838 2008-12-09 17:53 matplotlib-0.98.5/doc/mpl_data/matplotlib.conf.templatehrw-r--r-- cmoad/staff 0 2008-12-09 17:53 matplotlib-0.98.5/lib/matplotlib/mpl-data/matplotlib.conf.template link to matplotlib-0.98.5/doc/mpl_data/matplotlib.conf.template If you unpack the tarball using a standard incantation, a copy is made:: jdhun...@bic128:tmp> tar xfz matplotlib-0.98.5.tar.gz jdhun...@bic128:tmp> cd matplotlib-0.98.5/ jdhun...@bic128:matplotlib-0.98.5> ls -ld doc/mpl_data/matplotlib.conf.template lib/matplotlib/mpl-data/matplotlib.conf.template -rw-r--r-- 2 jdhunter jdhunter 13838 Dec 9 17:53 doc/mpl_data/matplotlib.conf.template -rw-r--r-- 2 jdhunter jdhunter 13838 Dec 9 17:53 lib/matplotlib/mpl-data/matplotlib.conf.template I think what may be happening is that setuptools are reading the tarball using the python tarfile reader and the link is getting botched. However, I can read the "missing" file using tarfile:: In [17]: import tarfile In [18]: t = tarfile.open('dist/matplotlib-0.98.5.tar.gz') In [19]: o = t.extractfile('matplotlib-0.98.5/lib/matplotlib/mpl-data/matplotlib.conf') In [20]: s = o.read() In [21]: print s[:80] # MPLConfig - plaintext (in .conf format) # This is a sample matplotlib configu So I am not sure exactly what is going wrong but I think broken handling of the link is playing a role. I will probably work around this by removing the links and making hard copies myself before building the sdist and eggs, unless I hear something more intelligent from someone or come up with something better. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users