unusual platform-dependent problem with tarfile created by setuptools
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/
On Jul 28, 2006, at 2:36 AM, Michael Bayer wrote:
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.
test/Container.py contains a resource-fork or some other mac-specific attribute. At least in plain distutils 'sdist' seems to the platform tar and on OSX that creates ._* files for mac-specific attributes/ resource-forks. Ronald
mac specific ? i dont think so. however, perhaps something in the file is being incorrectly construed as mac-specific (but still, I dont think so). heres the code: http://www.myghty.org/trac/browser/myghtyutils/trunk/test/Container.py and the full set of imports... from myghtyutils.container import * import myghtyutils.buffer as buffer import random, time, weakref, sys, re import testbase import unittest, sys try: import thread except: raise "this test requires a thread-enabled python" and from then on its just unit tests. Ill see if just having a file called "Container.py" with minimal python in it produces the same results (not at an appropriate workstation at the moment). Ronald Oussoren wrote:
On Jul 28, 2006, at 2:36 AM, Michael Bayer wrote:
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.
test/Container.py contains a resource-fork or some other mac-specific attribute. At least in plain distutils 'sdist' seems to the platform tar and on OSX that creates ._* files for mac-specific attributes/ resource-forks.
Ronald
On Jul 29, 2006, at 6:31 AM, Michael Bayer wrote:
mac specific ? i dont think so. however, perhaps something in the file is being incorrectly construed as mac-specific (but still, I dont think so).
heres the code:
That's not relevant, that is the data fork of the file. The file has some non-posix attributes (such as the attribute that gets set when you set the 'Locked' flag in the 'Get Info' screen info the Finder), or a resource fork (maybe it has a custom Icon). I can't tell which without actually seeing the data. Feel free to sent me the output of sdist on the mac and I'll have a look. Ronald
sorry, I wasnt familiar with the term "resource fork" or its specifics until now, post-wiki/googling. so yes this is exactly the issue. quickest way to whack it, short of downloading all kinds of resource-fork-management tools (theres also a bunch that come with xcode but i cant get them to do anything useful...such as DeRez which just says the resource fork is "empty and unitialized"...why is that?), seems to be just cat the text of the file so some other file, delete the original, then rename; then youre just left with the data fork and that seems to clean it up. thanks very much. Ronald Oussoren wrote:
On Jul 29, 2006, at 6:31 AM, Michael Bayer wrote:
mac specific ? i dont think so. however, perhaps something in the file is being incorrectly construed as mac-specific (but still, I dont think so).
heres the code:
That's not relevant, that is the data fork of the file. The file has some non-posix attributes (such as the attribute that gets set when you set the 'Locked' flag in the 'Get Info' screen info the Finder), or a resource fork (maybe it has a custom Icon).
I can't tell which without actually seeing the data. Feel free to sent me the output of sdist on the mac and I'll have a look.
Ronald
participants (2)
-
Michael Bayer
-
Ronald Oussoren