]> granicus.if.org Git - python/commitdiff
Improve error message for "setup.py upload" without dist files (#21060)
authorÉric Araujo <merwok@netwok.org>
Sun, 18 Feb 2018 23:14:54 +0000 (18:14 -0500)
committerGitHub <noreply@github.com>
Sun, 18 Feb 2018 23:14:54 +0000 (18:14 -0500)
Lib/distutils/command/upload.py
Misc/NEWS.d/next/Library/2018-02-17-19-20-19.bpo-21060.S1Z-x6.rst [new file with mode: 0644]

index f7752f9d12c74fc203da0db61d084e9896e323fc..32dda359badb32bc4a215e4c1e8a7859204c898b 100644 (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)
diff --git a/Misc/NEWS.d/next/Library/2018-02-17-19-20-19.bpo-21060.S1Z-x6.rst b/Misc/NEWS.d/next/Library/2018-02-17-19-20-19.bpo-21060.S1Z-x6.rst
new file mode 100644 (file)
index 0000000..4e0a113
--- /dev/null
@@ -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".