jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/825366 )
Change subject: [IMPR] use subprocess.check_call instead of run ......................................................................
[IMPR] use subprocess.check_call instead of run
Also set shell=True because we have a string as command line
Change-Id: Iadd06abafa9706b9ffac4c82a6079b412719c283 --- M make_dist.py 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/make_dist.py b/make_dist.py index b975f47..a285a7f 100644 --- a/make_dist.py +++ b/make_dist.py @@ -43,8 +43,8 @@ # Distributed under the terms of the MIT license. # import shutil -import subprocess import sys +from subprocess import check_call from pathlib import Path
from pywikibot import __version__, error, info, input_yn, warning @@ -140,8 +140,8 @@ local, remote, clear, upgrade, nodist = handle_args()
if upgrade: - subprocess.run('python -m pip install --upgrade pip') - subprocess.run('pip install --upgrade setuptools wheel twine ') + check_call('python -m pip install --upgrade pip', shell=True) + check_call('pip install --upgrade setuptools wheel twine ', shell=True)
if clear: clear_old_dist() @@ -159,13 +159,13 @@ cleanup()
if local: - subprocess.run('pip uninstall pywikibot -y') - subprocess.run( - 'pip install --no-index --pre --find-links=dist pywikibot') + check_call('pip uninstall pywikibot -y', shell=True) + check_call('pip install --no-index --pre --find-links=dist pywikibot', + shell=True)
if remote and input_yn( '<<lightblue>>Upload dist to pypi', automatic_quit=False): - subprocess.run('twine upload dist/*') + check_call('twine upload dist/*', shell=True)
if __name__ == '__main__':