[Distutils] setuptools and sdist on Mac OS X, tarfile flukes

Sidnei da Silva sidnei at enfoldsystems.com
Thu Feb 15 18:38:43 CET 2007


Not sure if anyone reported a similar issue here since I'm not subscribed, but
here it goes.

Some of the new plone.* eggs are being built on OS X by the developers, they
usually do 'setup.py sdist bdist_egg upload'. Sometimes they only do 'setup.py
sdist upload'

Turns out that if you try to easy_install and there's only the sdist package,
but no egg, easy_install uses tarfile to unpack the package, build an egg and
install the egg. However, for some reason some of those nasty '._<filename>'
files that OS X creates end up in the tarball. And tarfile then fails to unpack
the tarball. One such package is 'plone.app.controlpanel 1.0a2'
(http://cheeseshop.python.org/packages/source/p/plone.app.controlpanel/plone.app.controlpanel-1.0a2.tar.gz#md5=2b2afeaba0d067f6b1a6707c6d69311d),
with the following traceback:

C:\DOCUME~1\Sidnei\LOCALS~1\Temp>easy_install -f . plone.app.controlpanel
Searching for plone.app.controlpanel
Best match: plone.app.controlpanel 1.0a2
Processing plone.app.controlpanel-1.0a2.tar.gz
Traceback (most recent call last):
  File "c:\Python24\Scripts\easy_install-script.py", line 7, in ?
    sys.exit(
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 1670, in main
    with_ei_usage(lambda:
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 1659, in with_ei_usage
    return f()
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 1674, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:\Python24\lib\distutils\core.py", line 149, in setup
    dist.run_commands()
  File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
    cmd_obj.run()
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 446, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 471, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\comm
and\easy_install.py", line 626, in install_eggs
    unpack_archive(dist_filename, tmpdir, self.unpack_progress)
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\arch
ive_util.py", line 67, in unpack_archive
    driver(filename, extract_dir, progress_filter)
  File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\setuptools\arch
ive_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

I'm left wondering if the issue is:

 a) Windows
 b) The nasty OS X file
 c) The Python 'tarfile' module
 d) setuptools
 e) None of the above :)

Thoughts?

-- 
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214





More information about the Distutils-SIG mailing list