You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better error message for setup.py upload command without sdist/bdist #65259
python setup.py upload
running upload
error: no dist file created in earlier command
I thought I was going mad because I could see the dist file, it was right there in all of [its] tar and gzipped glory.
“earlier command” is misleading, as the dist file must be created by the same command line that calls upload (for now at least; see bpo-12944). The error message should be clearer, and if the doc doesn’t explain how this works, it should be improved too.
Attaching a patch with a (hopefully) more useful error message.
I didn't find a good place to add this information in the "Distributing Python Modules" section of the docs, but let me know if you had a place in mind.
changed the title [-]Better error message for setup.py upload command without sdist[/-][+]Better error message for setup.py upload command without sdist/bdist[/+]on Jan 28, 2018
New changeset eeb3365 by Mariatta (Éric Araujo) in branch '2.7':
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726). eeb3365
Activity
merwok commentedon Mar 25, 2014
From http://jamie.curle.io/blog/my-first-experience-adding-package-pypi/ :
I thought I was going mad because I could see the dist file, it was right there in all of [its] tar and gzipped glory.
“earlier command” is misleading, as the dist file must be created by the same command line that calls upload (for now at least; see bpo-12944). The error message should be clearer, and if the doc doesn’t explain how this works, it should be improved too.
jramnani commentedon Apr 15, 2014
Attaching a patch with a (hopefully) more useful error message.
I didn't find a good place to add this information in the "Distributing Python Modules" section of the docs, but let me know if you had a place in mind.
merwok commentedon Jan 28, 2018
For improving the message, I am hesitating between adding to the existing message (hoping to help search engines find their way to improved docs):
«No dist file created in earlier command (e.g. setup.py sdist upload)»
and rewriting it entirely:
«Must create and upload dist files in one command (e.g. setup.py sdist upload)»
[-]Better error message for setup.py upload command without sdist[/-][+]Better error message for setup.py upload command without sdist/bdist[/+]jramnani commentedon Feb 11, 2018
I think the error message you suggested is better than the one in the current patch. I've added a new patch with your improved message.
I haven't submitted or updated a patch since the migration to GitHub. I can open a PR over on GitHub if that would make it easier for you.
merwok commentedon Feb 18, 2018
Thanks for the feedback, I went with the cleaner phrasing.
Mariatta commentedon Feb 19, 2018
New changeset eeb3365 by Mariatta (Éric Araujo) in branch '2.7':
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).
eeb3365
merwok commentedon Feb 19, 2018
Fixed in all branches. I messed up the ticket reference so some links are missing here.