Skip to content

Commit f6b34ed

Browse files
committed
Update PyPI deployment to use Twine (close snowplow#207)
1 parent 91da00a commit f6b34ed

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ python:
77
- '3.4'
88
- '3.5'
99
install:
10+
- pip install -U pip setuptools virtualenv twine
1011
- pip install -r requirements-test.txt
1112
- pip install release-manager
1213
- pip install -e .

.travis/deploy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414

1515
HOME = expanduser("~")
16-
DEFAULT_SERVER = 'https://pypi.python.org/pypi'
1716
DEFAULT_REPO = 'pypi'
1817
PYPIRC_FILE = '%s/.pypirc' % HOME
1918

@@ -55,7 +54,6 @@ def write_config():
5554
' %s\n' % DEFAULT_REPO,
5655
'\n',
5756
'[%s]\n' % DEFAULT_REPO,
58-
'repository=%s\n' % DEFAULT_SERVER,
5957
'username=snowplow\n',
6058
'password=%s\n' % PYPI_PASSWORD
6159
]
@@ -71,8 +69,8 @@ def deploy_to_pypi():
7169
"""Deploys the release to PyPi"""
7270
logger.log_start("Deploying to PyPi")
7371
os.chdir(TRAVIS_BUILD_DIR)
74-
utils.execute("python setup.py register -r pypi", shell=True)
75-
utils.execute("python setup.py sdist upload -r pypi", shell=True)
72+
utils.execute("python setup.py sdist bdist_wheel", shell=True)
73+
utils.execute("twine upload dist/*", shell=True)
7674
logger.log_info("Module deployed to PyPi!")
7775
logger.log_done()
7876

0 commit comments

Comments
 (0)