[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/lib/myghtyutils/<other .py files>

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:


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:

\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\ 

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