[2.7] bpo-21060 Improve error message for "setup.py upload" without d… · python/cpython@eeb3365 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit eeb3365
authored and
committed
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).
(cherry picked from commit 08a6926) Co-authored-by: Éric Araujo merwok@netwok.org
File tree
2 files changed
lines changed
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -55,7 +55,9 @@ def finalize_options(self): | ||
55 | 55 | |
56 | 56 | def run(self): |
57 | 57 | if not self.distribution.dist_files: |
58 | -raise DistutilsOptionError("No dist file created in earlier command") | |
58 | +msg = ("Must create and upload files in one command " | |
59 | +"(e.g. setup.py sdist upload)") | |
60 | +raise DistutilsOptionError(msg) | |
59 | 61 | for command, pyversion, filename in self.distribution.dist_files: |
60 | 62 | self.upload_file(command, pyversion, filename) |
61 | 63 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1 | +Rewrite confusing message from setup.py upload from | |
2 | +"No dist file created in earlier command" to the more helpful | |
3 | +"Must create and upload files in one command". |