Skip to content

Commit 7866ec0

Browse files
authored
Merge pull request #50 from UWIT-IAM/pypi
Deploy to pypi on tags.
2 parents e8954d9 + 9bea93b commit 7866ec0

3 files changed

Lines changed: 31 additions & 8 deletions

File tree

.travis.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
language: python
22
python:
3-
- "2.7"
4-
- "3.6"
3+
- '2.7'
4+
- '3.6'
55
install:
66
- pip install -r requirements.txt
77
before_script:
88
- pip install coverage
99
- pip install pep8
1010
script:
1111
- pep8 --max-line-length=120 resttools
12-
- nosetests --with-coverage --cover-package=resttools
12+
- nosetests --with-coverage --cover-package=resttools
1313
after_script:
1414
- coverage report
15-
15+
before_deploy:
16+
- find resttools/ -name \*.pyc -exec rm {} \;
17+
- git describe --tags > resttools/VERSION
18+
deploy:
19+
provider: pypi
20+
skip_cleanup: true
21+
user: jeffrouw
22+
password:
23+
secure: Hk16fdmiYvODsFjQl6hVF8LwphRUzIXOO7KA8bD3m2xM6hw9a01Tf0sv37wSUEJSJOURv1K8MBSOdE7yFGaYB5it7DvGI3ozGX2RMcCdkKWD6wtRHxTy1r8iOpQXEaOkYo32ZbVYQGAjVoJHlIf5U/IkyJAV2khJwiWd66PTX/8=
24+
on:
25+
tags: true
26+
python: '3.6'

resttools/VERSION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Updated by CI at deploy-time
2+
0.0.1

setup.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
# from distutils.core import setup
1+
import os
22
from setuptools import setup, find_packages
3-
setup(name='resttools',
4-
version='1.0',
5-
description='UW-IT REST library',
3+
4+
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
5+
VERSION_FILE = os.path.join(BASE_DIR, 'resttools', 'VERSION')
6+
with open(VERSION_FILE) as f:
7+
VERSION = f.readlines()[-1].strip()
8+
9+
setup(name='uw-iam-resttools',
10+
version=VERSION,
11+
url='https://github.com/UWIT-IAM/iam-resttools',
12+
author='UW-IT Identity and Access Management',
13+
author_email='help@uw.edu',
14+
description='UW-IT REST library for IAM APIs',
15+
license='Apache License, Version 2.0',
616
packages=find_packages(),
717
include_package_data=True,
818
install_requires=['lxml', 'python-dateutil', 'urllib3', 'jinja2', 'six']

0 commit comments

Comments
 (0)