diff --git a/.appveyor.yml b/.appveyor.yml index 00cbfbfd..f7ef6521 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -128,4 +128,4 @@ artifacts: - path: "*.whl" deploy_script: - - IF "%APPVEYOR_REPO_TAG%" == "true"( python ci/appveyor/pypi_upload.py *.whl ) + - python ci/appveyor/pypi_upload.py *.whl diff --git a/ci/appveyor/pypi_upload.py b/ci/appveyor/pypi_upload.py index 3b465e83..b44ce4b6 100644 --- a/ci/appveyor/pypi_upload.py +++ b/ci/appveyor/pypi_upload.py @@ -1,11 +1,13 @@ -from __future__ import print_function - import sys import subprocess import os def upload_pypi(files): + repo_tag = os.environ['APPVEYOR_REPO_TAG'] + if repo_tag == 'false': + sys.stderr.write("Not a tagged release, skipping upload" + os.linesep) + return _user, _pass = os.environ['PYPI_USER'], os.environ['PYPI_PASS'] try: subprocess.check_call(['twine', 'upload', '-u', _user,