summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-12-03 15:32:38 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-12-03 15:42:14 +0100
commit733868ff875a4a284cef77bd3e013d69ebef3c3e (patch)
treeaae9daeea540f5735b72586c9b9a5352f0b1f5e4
parenta580079206b5e84801eb6c195264ac61f93962bd (diff)
downloadqutebrowser-733868ff875a4a284cef77bd3e013d69ebef3c3e.tar.gz
qutebrowser-733868ff875a4a284cef77bd3e013d69ebef3c3e.zip
scripts: Run 'twine check'
-rwxr-xr-xscripts/dev/build_release.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py
index ddad1b607..d82c162b0 100755
--- a/scripts/dev/build_release.py
+++ b/scripts/dev/build_release.py
@@ -600,8 +600,18 @@ def github_upload(artifacts, tag, gh_token):
def pypi_upload(artifacts):
"""Upload the given artifacts to PyPI using twine."""
utils.print_title("Uploading to PyPI...")
+ run_twine('upload', artifacts)
+
+
+def twine_check(artifacts):
+ """Check packages using 'twine check'."""
+ utils.print_title("Running twine check...")
+ run_twine('check', artifacts, '--strict')
+
+
+def run_twine(command, artifacts, *args):
filenames = [a[0] for a in artifacts]
- subprocess.run([sys.executable, '-m', 'twine', 'upload'] + filenames,
+ subprocess.run([sys.executable, '-m', 'twine', command] + list(args) + filenames,
check=True)
@@ -664,6 +674,7 @@ def main():
else:
test_makefile()
artifacts = build_sdist()
+ twine_check(artifacts)
upload_to_pypi = True
if args.upload: