[Distutils] unusual platform-dependent problem with tarfile created by setuptools
Michael Bayer
mike_mp at zzzcomputing.com
Fri Jul 28 02:36:52 CEST 2006
hey all -
the MyghtyUtils package, version 0.52 on cheeseshop, has this general
file structure:
MyghtyUtils-0.52/setup.py
MyghtyUtils-0.52/ez_setup.py
MyghtyUtils-0.52/lib/myghtyutils/__init__.py
MyghtyUtils-0.52/lib/myghtyutils/memcached.py
MyghtyUtils-0.52/lib/myghtyutils/<other .py files>
MyghtyUtils-0.52/test/Container.py
MyghtyUtils-0.52/test/LRUCache.py
MyghtyUtils-0.52/test/SyncDict.py
MyghtyUtils-0.52/test/testbase.py
however, when you run "python setup.py sdist" on an OS X machine
(interestingly, *not* on a windows machine), the resulting tar/gz
file contains an extra file:
MyghtyUtils-0.52/test/._Container.py
no idea why that is...but this creates problems on windows.
Then, when you go to install this package on a windows machine (*not*
on an OS X or other unixy machine), you get this error:
File
"c:\python24\lib\site-packages\setuptools-0.6c1-py2.4.egg\setuptools
\archive_util.py", line 192, in unpack_tarfile
tarobj._extract_member(member,dst) # XXX Ugh
File "C:\Python24\lib\tarfile.py", line 1440, in _extract_member
self.utime(tarinfo, targetpath)
File "C:\Python24\lib\tarfile.py", line 1572, in utime
raise ExtractError, "could not change modification time"
tarfile.ExtractError: could not change modification time
when I go into tarfile.py line 1572 and modify the exception to also
print out the underying error, you get this:
IOError: [Errno 13] Permission Denied: 'MyghtyUtils-0.52\\test\
\._Container.py'
So the extra "._Container.py" file is the source of the windows issue.
If you want to reproduce, simply check out the latest source of
MyghtyUtils from http://svn.myghty.org/myghtyutils/trunk and run
"setup.py sdist". I havent seen this happen with my other packages.
I have solved the problem by just running the sdist on the windows
machine. but this is pretty strange. any ideas ?
More information about the Distutils-SIG
mailing list