diff options
author | Matt Singleton <matt@xcolour.net> | 2018-03-07 17:40:15 -0500 |
---|---|---|
committer | Matt Singleton <matt@xcolour.net> | 2018-03-07 17:40:15 -0500 |
commit | 8abfddf83bb42121587cf808b2ea90a3148ed1be (patch) | |
tree | d2ddf84f6fe485fc3a21c6d1beab2c65e7fa097e | |
parent | 10fce3985f651832bf1d3809e54841e6e149dd1c (diff) |
get travis to build the whl and push it to github?
-rw-r--r-- | .travis.yml | 20 | ||||
-rw-r--r-- | setup.py | 12 |
2 files changed, 27 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 190ffef..52f5005 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,20 @@ language: python python: - - "3.6" + - '3.6' install: - - pip install -r requirements.txt - - pip install flake8~=3.5.0 + - pip install flake8~=3.5.0 script: - - flake8 + - flake8 + - python setup.py bdist_wheel +before_deploy: + - git config --local user.name "Travis CI" + - git config --local user.email "matt+travisci@xcolour.net" + - git tag "build-$TRAVIS_BUILD_NUMBER" +deploy: + provider: releases + api_key: + secure: NAvMJri+3inKF+v2fiXqX4uvqeCY5r9SE1rfOH+SC2DNYQy31FlJUnxY3xWSbiB+dNrWxwOgED18DLTWIcCNYJDuY+4LBkw7hzhomL6+AeeIQ7WLXb8NMMY+HMXmG6qeCNlAQwDSiHGEqyMBcQRWok5iHT/OFZhgEZ4gz5aovFeCpnSUyRwcMtpIFMywi6nlC9TZPX+Z+S7NsqlOQ1o9n1957OLYcCcVwJFvi5RJs842KxxHFeGdsCVHRQC5l249ZuC8tRVgYKxzCxTeSJOphyh4PawI7VYmmTb56Y40A/Rj8M/MK6l/BRnmtunUPsokPduqG1/Eh1uqtjcEyVzS3NYprWN8UzgKL0Jt+asHJDQ+MWm2d1hl+mrqF6hB/Irs93LQ0uKdsZjnz0njDcFaz8a/U9YeGNUqw03bpdHk4/ZTEivFlaYANVmMUkVFpUi68f9FGvzQ+GUfwbCTdP+6jyt5bQ7BjQ3arHK5lJS9/ZNP+gZ4QGP3oOnwlaVpfqzsubDIJOoAototSM5vaY892ffOtFSDEJEaYiqCdWHcmOovne08Yru6KC5maJmZQwHxGKDHarZzZNGJUBjuVfDXMGSjm5OxUthJ3/13jnXckZNSRqkn8xFOV89muzNSMq27iSIYhy/BZoD8EGx+0zX3+nNLyAn+yzq+6RtsZ6HswjU= + file: 'dist/*.whl' + skip_cleanup: true + on: + repo: xcolour/unbiased @@ -1,8 +1,18 @@ +import os from setuptools import setup +buildnum = os.environ.get('TRAVIS_BUILD_NUMBER') +if buildnum is None: + version = '0.dev0' +else: + version = buildnum +gitrev = os.environ.get('TRAVIS_COMMIT') +if gitrev is not None: + version = '{}+{}'.format(version, gitrev) + setup( name="unbiased", - version="5", + version=version, packages=['unbiased', 'unbiased.sources'], package_data={ 'unbiased': [ |