PyPI upload: zip okay, tar fails with "invalid distribution file"

I migrated my split py2/py3 code base into one as I couldn't get setup to do what I wanted, and now I am having this problem. Here's my setup.py: ======================================================================== import sys, os from distutils.core import setup long_desc = open('enum/doc/enum.rst').read() setup( name='enum34', version='0.9.1', url='https://pypi.python.org/pypi/enum34', packages=['enum'], package_data={ 'enum' : [ 'LICENSE', 'README', 'doc/enum.rst', 'doc/enum.pdf', 'test/test_enum.py', ] }, license='BSD License', description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4', long_description=long_desc, provides=['enum'], author='Ethan Furman', author_email='ethan@stoneleaf.us', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Topic :: Software Development' ], ) ======================================================================== and an example run: ======================================================================== ethan@media:~/source/enum$ python setup.py sdist --formats tar upload running sdist running check reading manifest template 'MANIFEST.in' writing manifest file 'MANIFEST' creating enum34-0.9.1 creating enum34-0.9.1/enum creating enum34-0.9.1/enum/doc creating enum34-0.9.1/enum/test making hard links in enum34-0.9.1... hard linking LICENSE -> enum34-0.9.1 hard linking README -> enum34-0.9.1 hard linking setup.py -> enum34-0.9.1 hard linking enum/__init__.py -> enum34-0.9.1/enum hard linking enum/doc/enum.pdf -> enum34-0.9.1/enum/doc hard linking enum/doc/enum.rst -> enum34-0.9.1/enum/doc hard linking enum/test/test_enum.py -> enum34-0.9.1/enum/test Creating tar archive removing 'enum34-0.9.1' (and everything under it) running upload Submitting dist/enum34-0.9.1.tar to http://pypi.python.org/pypi Upload failed (400): invalid distribution file ======================================================================== Any ideas? -- ~Ethan~

On 1 July 2013 19:19, Ethan Furman <ethan@stoneleaf.us> wrote:
ethan@media:~/source/enum$ python setup.py sdist --formats tar upload running sdist running check reading manifest template 'MANIFEST.in' writing manifest file 'MANIFEST' creating enum34-0.9.1 creating enum34-0.9.1/enum creating enum34-0.9.1/enum/doc creating enum34-0.9.1/enum/test making hard links in enum34-0.9.1... hard linking LICENSE -> enum34-0.9.1 hard linking README -> enum34-0.9.1 hard linking setup.py -> enum34-0.9.1 hard linking enum/__init__.py -> enum34-0.9.1/enum hard linking enum/doc/enum.pdf -> enum34-0.9.1/enum/doc hard linking enum/doc/enum.rst -> enum34-0.9.1/enum/doc hard linking enum/test/test_enum.py -> enum34-0.9.1/enum/test Creating tar archive removing 'enum34-0.9.1' (and everything under it) running upload Submitting dist/enum34-0.9.1.tar to http://pypi.python.org/pypi Upload failed (400): invalid distribution file ==============================**==============================** ============
Any ideas?
You probably want format gztar rather than tar. I don't think I've ever seen an uncompressed tar on PyPI - they probably aren't allowed... Paul

On 07/01/2013 12:11 PM, Paul Moore wrote:
On 1 July 2013 19:19, Ethan Furman <ethan@stoneleaf.us <mailto:ethan@stoneleaf.us>> wrote:
ethan@media:~/source/enum$ python setup.py sdist --formats tar upload running sdist running check reading manifest template 'MANIFEST.in' writing manifest file 'MANIFEST' creating enum34-0.9.1 creating enum34-0.9.1/enum creating enum34-0.9.1/enum/doc creating enum34-0.9.1/enum/test making hard links in enum34-0.9.1... hard linking LICENSE -> enum34-0.9.1 hard linking README -> enum34-0.9.1 hard linking setup.py -> enum34-0.9.1 hard linking enum/__init__.py -> enum34-0.9.1/enum hard linking enum/doc/enum.pdf -> enum34-0.9.1/enum/doc hard linking enum/doc/enum.rst -> enum34-0.9.1/enum/doc hard linking enum/test/test_enum.py -> enum34-0.9.1/enum/test Creating tar archive removing 'enum34-0.9.1' (and everything under it) running upload Submitting dist/enum34-0.9.1.tar to http://pypi.python.org/pypi Upload failed (400): invalid distribution file ==============================__==============================__============
Any ideas?
You probably want format gztar rather than tar. I don't think I've ever seen an uncompressed tar on PyPI - they probably aren't allowed...
I could've sworn I've used tar before, but at any rate going with gztar did the trick. Thanks! -- ~Ethan~

Op 01-07-13 21:12, Ethan Furman schreef:
On 07/01/2013 12:11 PM, Paul Moore wrote:
You probably want format gztar rather than tar. I don't think I've ever seen an uncompressed tar on PyPI - they probably aren't allowed...
I could've sworn I've used tar before, but at any rate going with gztar did the trick.
I always use --formats=zip, because in some corner cases Python2.4 has problems with the gztar format, not while creating a distribution file but when installing it. -- Maurits van Rees: http://maurits.vanrees.org/ Zest Software: http://zestsoftware.nl
participants (3)
-
Ethan Furman
-
Maurits van Rees
-
Paul Moore