Improve error message for "setup.py upload" without dist files (GH-21060)

(cherry picked from commit 08a6926b25)

Co-authored-by: Éric Araujo <merwok@netwok.org>
This commit is contained in:
Miss Islington (bot) 2018-02-18 19:57:17 -08:00 committed by GitHub
parent 19b7f6694a
commit 2072c80d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,8 @@ class upload(PyPIRCCommand):
def run(self):
if not self.distribution.dist_files:
msg = "No dist file created in earlier command"
msg = ("Must create and upload files in one command "
"(e.g. setup.py sdist upload)")
raise DistutilsOptionError(msg)
for command, pyversion, filename in self.distribution.dist_files:
self.upload_file(command, pyversion, filename)

View File

@ -0,0 +1,3 @@
Rewrite confusing message from setup.py upload from
"No dist file created in earlier command" to the more helpful
"Must create and upload files in one command".