[Distutils] Can't upload sdist: "File already exists"

Nick Timkovich prometheus235 at gmail.com
Thu Dec 22 11:04:55 EST 2016


So upload the sdist first in the future? What's the difference between
uploading an sdist second with code that differs from what's in the wheel
and vice versa, is PyPI doing some checking?

Generally, is it OK (recommended/socially acceptable) to upload universal
wheels only or is the sdist still nice to have available? I guess maybe for
pip, but it considering universal, pure-Python wheels as "binaries" seems
quirky.

On Thu, Dec 22, 2016 at 10:49 AM, Brett Cannon <brett at python.org> wrote:

> Because you already uploaded a wheel for version 0.1.2 you can't upload
> any other files for that version, else people could accidentally upload
> e.g. an sdist with code different from what was already uploaded in the
> wheel. If you want an sdist then I would do another release as version
> 0.1.2post1 with the wheel and sdist (or whatever the proper post release
> version format is; on my phone so a pain to look up right now).
>
> On Wed, Dec 21, 2016, 12:30 Nick Timkovich, <prometheus235 at gmail.com>
> wrote:
>
>> I have a little package "huffman" where I build an sdist and wheel
>> (python setup.py sdist bdist_wheel) and both seem to get built and can
>> install fine. I can't seem to upload both to PyPI because the "File already
>> exists":
>>
>> $ twine upload dist/*
>> Uploading distributions to https://upload.pypi.org/legacy/
>> Uploading huffman-0.1.2-py2.py3-none-any.whl
>> Uploading huffman-0.1.2.tar.gz
>> HTTPError: 400 Client Error: File already exists. for url:
>> https://upload.pypi.org/legacy/
>>
>> Subsequent call to upload *just* the tarball fails the same way. I can't
>> see an sdist anywhere, and uploading it via the website or twine just tells
>> me it's already there...somehow. Asking pip to try to give it to me fails
>> though (the binary works, however):
>>
>> $ pip download --no-cache-dir --only-binary :all: huffman==0.1.2
>> Collecting huffman==0.1.2
>>   Downloading huffman-0.1.2-py2.py3-none-any.whl
>>   Saved ./huffman-0.1.2-py2.py3-none-any.whl
>> Successfully downloaded huffman
>>
>>
>> $ pip download --no-cache-dir --no-binary :all: huffman==0.1.2
>> Collecting huffman==0.1.2
>>   Could not find a version that satisfies the requirement huffman==0.1.2
>> (from versions: )
>> No matching distribution found for huffman==0.1.2
>>
>> Am I missing something? I am as sure as I can be that I didn't upload it
>> twice; I bumped my version up one because I figured that may have been it.
>> "twine register" that some guides mention just gets shot down with an HTTP
>> "410 [...] simply upload the file"
>>
>> Cheers,
>> Nick
>> _______________________________________________
>> Distutils-SIG maillist  -  Distutils-SIG at python.org
>> https://mail.python.org/mailman/listinfo/distutils-sig
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20161222/5f52352f/attachment.html>


More information about the Distutils-SIG mailing list