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::
jdhunter@...2404...: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::
jdhunter@...2404...:mpl> python setup.py sdist > sdist.out
jdhunter@...2404...: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
jdhunter@...2404...: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::
jdhunter@...2404...:tmp> tar xfz matplotlib-0.98.5.tar.gz
jdhunter@...2404...:tmp> cd matplotlib-0.98.5/
jdhunter@...2404...: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.
···
On Mon, Dec 15, 2008 at 9:45 AM, Alexander Chemeris <alexander.chemeris@...287...> wrote:
I experience the same problem. Full shell session (of one
command
is following:
~$ sudo easy_install matplotlib
Searching for matplotlib
Reading Links for matplotlib
Reading http://matplotlib.sourceforge.net
Reading
matplotlib - Browse /matplotlib at SourceForge.net
Reading
matplotlib - Browse /matplotlib-maintenance at SourceForge.net
Reading matplotlib - Browse Files at SourceForge.net
Best match: matplotlib 0.98.5
Downloading
Download matplotlib-0.98.5.tar.gz (matplotlib)
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