-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds compatibility for auto-deploy as introduced in LasLabs/python-quality-tools#3
- Loading branch information
Showing
4 changed files
with
94 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,41 @@ | ||
addons: | ||
apt: | ||
packages: | ||
- expect-dev # provides unbuffer utility | ||
- unixodbc-dev | ||
apt: | ||
packages: | ||
- expect-dev # provides unbuffer utility | ||
- unixodbc-dev | ||
|
||
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "2.7" | ||
|
||
virtualenv: | ||
system_site_packages: true | ||
system_site_packages: true | ||
|
||
env: | ||
global: | ||
- TESTS="0" LINT_CHECK="0" DOCS="0" VERSION="0.1.0" RELEASE="0.1.8" PROJECT="Python CarePoint" BRANCH_PROD="master" BRANCH_DOC="gh-pages" | ||
matrix: | ||
- TESTS="1" | ||
- DOCS="1" | ||
global: | ||
- VERSION="0.1.0" | ||
- RELEASE="0.1.8" | ||
- PROJECT="Python CarePoint" | ||
- BRANCH_PROD="master" | ||
- BRANCH_DOC="gh-pages" | ||
- TESTS="0" | ||
- LINT_CHECK="0" | ||
- DOCS="0" | ||
- PYPI="0" | ||
- secure: "Agq7rh2FbYpV5u1WhpEcfjx/V9dwB04NwWhQMGviVeTQgwszgoHZ6XzDCIoWRwBmxOHBPFw2FIBf7/QwQAOJrnB0C9Ijza1t9LmsUWextOBNGnZTYuMdM0sUigPhQ5mVgHEs5sWRPf8JyRS4n2v0bzlrIA3PGvUU3LBipJ6CsmgQLfEb9Xy16KTCcneRBCUZHEc4sNNPOnLrXC+DhnKKBzFhdQKeQlDj1SOsvYsFDRIRe1Y2A2lgXgIYXO6mfdBz51G3AcRI3dZTQoOawtXHz00IOeNMkgv4AtaywlcDd4Io+Z0z0O+p6CJRW6DvJo4Ldi9lh2/nLbPcm+1Gqv4qAaIACCTI34mO+K3u/Yrh1baS+QfI9V03k5hmV2MtiEeSjA0TwDJj24Pmczesccn4iVrlcn+XFSDz8BDLRhp1RMjSP8YQ3+7W5UFpEuVpyPFwpYJsbVHfHDBL94zcyyhoitriI9DRV4IgqiQ59TGfINLBh8ssZtDuNhLPjEvDMMQwEdOyFnkakEA83eGebVyEXHCAREL8G/XKqr2WJV7UMHpDtc0DmVlwuH4ZBYKCA9L2+sYg9s5d2Z+tJrDucXwBan1W7ov9wqer8DotyxgC5eht8KVS2WuTjsgxErevVDV+PGn9Wnfwlqxw/Rih6CKdT+W1/rEVr3ufcTJrYD3jm6U=" | ||
matrix: | ||
- TESTS="1" | ||
- PYPI="1" | ||
- DOCS="1" | ||
|
||
install: | ||
- git clone --depth=1 https://github.com/LasLabs/python-quality-tools.git ${HOME}/python-quality-tools | ||
- export PATH=${HOME}/python-quality-tools/travis:${PATH} | ||
- travis_install | ||
- git clone --depth=1 https://github.com/LasLabs/python-quality-tools.git ${HOME}/python-quality-tools | ||
- export PATH=${HOME}/python-quality-tools/travis:${PATH} | ||
- travis_install | ||
|
||
script: | ||
- travis_run | ||
- travis_run | ||
|
||
after_success: | ||
- travis_after_success | ||
- travis_after_success |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2015-TODAY LasLabs Inc. | ||
# Copyright 2016-TODAY LasLabs Inc. | ||
# License MIT (https://opensource.org/licenses/MIT). | ||
|
||
from setuptools import setup | ||
from setuptools import Command, setup | ||
from setuptools import find_packages | ||
from tests import Tests | ||
from unittest import TestLoader, TextTestRunner | ||
|
||
from os import environ, path | ||
|
||
|
||
PROJECT = 'carepoint' | ||
SHORT_DESC = ( | ||
'This library will allow you to interact with a remote CarePoint ' | ||
'instance using Python.' | ||
) | ||
README_FILE = 'README.rst' | ||
|
||
version = environ.get('RELEASE') or environ.get('VERSION') or '0.0.0' | ||
|
||
if environ.get('TRAVIS_BUILD_NUMBER'): | ||
version += 'b%s' % environ.get('TRAVIS_BUILD_NUMBER') | ||
|
||
|
||
setup_vals = { | ||
'name': 'carepoint', | ||
'version': '0.1.8', | ||
'name': PROJECT, | ||
'author': 'LasLabs Inc.', | ||
'author_email': '[email protected]', | ||
'description': 'This library will allow you to interact with CarePoint ' | ||
'using Python.', | ||
'url': 'https://github.com/laslabs/python-carepoint', | ||
'description': SHORT_DESC, | ||
'url': 'https://laslabs.github.io/%s' % PROJECT, | ||
'download_url': 'https://github.com/LasLabs/%s' % PROJECT, | ||
'license': 'MIT', | ||
'classifiers': [ | ||
'Development Status :: 4 - Beta', | ||
|
@@ -26,21 +40,52 @@ | |
'Programming Language :: Python', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
'version': version, | ||
} | ||
|
||
|
||
setup( | ||
packages=find_packages(exclude=('tests')), | ||
cmdclass={'test': Tests}, | ||
tests_require=[ | ||
'xmlrunner', | ||
'mock', | ||
], | ||
install_requires=[ | ||
'enum34', | ||
'pyodbc', | ||
'pysmb', | ||
'sqlalchemy', | ||
], | ||
**setup_vals | ||
) | ||
if path.exists(README_FILE): | ||
with open(README_FILE) as fh: | ||
setup_vals['long_description'] = fh.read() | ||
|
||
|
||
install_requires = [] | ||
if path.exists('requirements.txt'): | ||
with open('requirements.txt') as fh: | ||
install_requires = fh.read().splitlines() | ||
|
||
|
||
class FailTestException(Exception): | ||
""" It provides a failing build """ | ||
pass | ||
|
||
|
||
class Tests(Command): | ||
''' Run test & coverage, save reports as XML ''' | ||
|
||
user_options = [] # < For Command API compatibility | ||
|
||
def initialize_options(self, ): | ||
pass | ||
|
||
def finalize_options(self, ): | ||
pass | ||
|
||
def run(self, ): | ||
loader = TestLoader() | ||
tests = loader.discover('.', 'test_*.py') | ||
t = TextTestRunner(verbosity=1) | ||
res = t.run(tests) | ||
if not res.wasSuccessful(): | ||
raise FailTestException() | ||
|
||
if __name__ == "__main__": | ||
setup( | ||
packages=find_packages(exclude=('tests')), | ||
cmdclass={'test': Tests}, | ||
tests_require=[ | ||
'mock', | ||
], | ||
install_requires=install_requires, | ||
**setup_vals | ||
) |