Message143399
If there are any broken symlinks in the same directory as a setup.py when e.g. sdist is run, findall() will fall over when attempting to os.stat() the symlink:
Traceback (most recent call last):
File "setup.py", line 81, in run
_sdist.run(self)
File "/usr/lib/python2.6/distutils/command/sdist.py", line 144, in run
self.get_file_list()
File "/usr/lib/python2.6/distutils/command/sdist.py", line 238, in get_file_list
self.filelist.findall()
File "/usr/lib/python2.6/distutils/filelist.py", line 47, in findall
self.allfiles = findall(dir)
File "/usr/lib/python2.6/distutils/filelist.py", line 297, in findall
stat = os.stat(fullname)
OSError: [Errno 2] No such file or directory: 'debian/tmp/usr/share/somepath/somesymlink'
Solutions would include replacing the call to os.stat() with one to os.lstat() (probably backwards-incompatible), or trying one and then the other.
This bug is present in Pythons 2.6.6 (Debian 6.0.2) and 2.7 (Fedora 14).
When attempting to reproduce in Python 3.1.2 (on Fedora) no error was encountered. However, looking at distutils/filelist.py, the same unadulterated call to os.stat() is present. I'll presume that for whatever reason distutils in Py3.1.2 never has cause to stat my broken symlink. |
|
Date |
User |
Action |
Args |
2011-09-02 13:57:23 | Alexander.Dutton | set | recipients:
+ Alexander.Dutton, tarek, eric.araujo |
2011-09-02 13:57:23 | Alexander.Dutton | set | messageid: <1314971843.03.0.797964996491.issue12885@psf.upfronthosting.co.za> |
2011-09-02 13:57:22 | Alexander.Dutton | link | issue12885 messages |
2011-09-02 13:57:21 | Alexander.Dutton | create | |
|