mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).
(cherry picked from commit 08a6926b25)
Co-authored-by: Éric Araujo <merwok@netwok.org>
This commit is contained in:
@@ -55,7 +55,9 @@ class upload(PyPIRCCommand):
|
||||
|
||||
def run(self):
|
||||
if not self.distribution.dist_files:
|
||||
raise DistutilsOptionError("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)
|
||||
|
||||
|
||||
@@ -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".
|
||||
Reference in New Issue
Block a user