Skip to content

Commit 57f8e6f

Browse files
author
Clark Perkins
committed
Make travis upload to pypi
1 parent 5e63048 commit 57f8e6f

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

.travis.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,13 @@ language: python
22

33
python:
44
- "2.7"
5-
- "3.3"
65
- "3.4"
6+
- "3.5"
77

88
cache:
99
directories:
1010
- $HOME/.cache/pip
1111

12-
# Set up our environment
13-
env:
14-
NOSE_WITH_XUNIT: 1
15-
NOSE_WITH_COVERAGE: 1
16-
NOSE_COVER_BRANCHES: 1
17-
NOSE_COVER_INCLUSIVE: 1
18-
1912
# So that we get a docker container
2013
sudo: false
2114

@@ -37,18 +30,30 @@ script:
3730
# Only build artifacts on success
3831
after_success:
3932
- coveralls
40-
- export STACKDIO_VERSION=`python setup.py --version`
4133
- python setup.py sdist
4234
- python setup.py bdist_wheel
4335

4436
deploy:
45-
provider: releases
46-
api_key:
47-
secure: T4jI1aZQ+wDJBgGxcbdrtLz3zpXA9yZwmrsm8d3GqEGxApMtkKLWq0uqf86C8VkqaY6p4Nm1a/PTApV1isbuSoJbdeMVJA1MlYB/G7QMK7eI8nFqkw7Q4jzuOdEC0D1CPZx7ZWBn0bYxSRTcSeQSnGeGDy2KxekGSZFfIxe4APo=
48-
file:
49-
- dist/stackdio-${STACKDIO_VERSION}.tar.gz
50-
- dist/stackdio-${STACKDIO_VERSION}-py2.py3-none-any.whl
51-
skip_cleanup: true
52-
on:
53-
tags: true
54-
repo: stackdio/stackdio-python-client
37+
- provider: releases
38+
api_key:
39+
secure: T4jI1aZQ+wDJBgGxcbdrtLz3zpXA9yZwmrsm8d3GqEGxApMtkKLWq0uqf86C8VkqaY6p4Nm1a/PTApV1isbuSoJbdeMVJA1MlYB/G7QMK7eI8nFqkw7Q4jzuOdEC0D1CPZx7ZWBn0bYxSRTcSeQSnGeGDy2KxekGSZFfIxe4APo=
40+
file:
41+
- dist/stackdio-${TRAVIS_TAG}.tar.gz
42+
- dist/stackdio-${TRAVIS_TAG}-py2.py3-none-any.whl
43+
skip_cleanup: true
44+
on:
45+
tags: true
46+
repo: stackdio/stackdio-python-client
47+
python: "2.7"
48+
49+
# Upload to pypi. Do this instead of the pypi provider so that we
50+
# ensure the exact same artifact is uploaded to github and pypi.
51+
# The pypi provider will re-build the 2 artifacts, which is not ideal.
52+
# This requires setting TWINE_USERNAME and TWINE_PASSWORD in travis.
53+
- provider: script
54+
script: twine upload dist/stackdio-${TRAVIS_TAG}.tar.gz dist/stackdio-${TRAVIS_TAG}-py2.py3-none-any.whl
55+
skip_cleanup: true
56+
on:
57+
tags: true
58+
repo: stackdio/stackdio-python-client
59+
python: "2.7"

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# limitations under the License.
1616
#
1717

18-
import os
1918
import sys
2019

2120
from setuptools import setup, find_packages
@@ -25,9 +24,9 @@ def test_python_version():
2524
major = sys.version_info[0]
2625
minor = sys.version_info[1]
2726
micro = sys.version_info[2]
28-
if float('%d.%d' % (major, minor)) < 2.6:
27+
if (major, minor) < (2, 7):
2928
err_msg = ('Your Python version {0}.{1}.{2} is not supported.\n'
30-
'stackdio-server requires Python 2.6 or newer.\n'.format(major, minor, micro))
29+
'stackdio-server requires Python 2.7 or newer.\n'.format(major, minor, micro))
3130
sys.stderr.write(err_msg)
3231
sys.exit(1)
3332

@@ -85,7 +84,6 @@ def test_python_version():
8584
'console_scripts': [
8685
'stackdio-cli=stackdio.cli:main',
8786
'blueprint-generator=stackdio.cli.blueprints:main',
88-
'stackdio-config-convert=stackdio.client.config:main',
8987
],
9088
},
9189
classifiers=[
@@ -99,8 +97,8 @@ def test_python_version():
9997
'Programming Language :: Python :: 2',
10098
'Programming Language :: Python :: 2.7',
10199
'Programming Language :: Python :: 3',
102-
'Programming Language :: Python :: 3.3',
103100
'Programming Language :: Python :: 3.4',
101+
'Programming Language :: Python :: 3.5',
104102
'Topic :: System :: Clustering',
105103
'Topic :: System :: Distributed Computing',
106104
]

0 commit comments

Comments
 (0)