-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from adafruit/auto-pypi-work
Builds release automatically to PyPi
- Loading branch information
Showing
3 changed files
with
69 additions
and
37 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,22 +1,30 @@ | ||
# .travis.yml for Adafruit IO Python Client Library | ||
language: python | ||
dist: trusty | ||
sudo: required | ||
|
||
python: | ||
- "3.6" | ||
|
||
- '3.6' | ||
cache: | ||
pip: true | ||
|
||
|
||
pip: true | ||
install: | ||
- python setup.py install | ||
- pip install pylint Sphinx sphinx-rtd-theme | ||
- pip install . | ||
|
||
- python3 setup.py install | ||
- pip3 install pylint Sphinx sphinx-rtd-theme | ||
- pip3 install . | ||
script: | ||
- cd docs && sphinx-build -E -W -b html . _build/html | ||
- cd .. | ||
- cd tests/ | ||
- python -m unittest discover | ||
- cd docs && sphinx-build -E -W -b html . _build/html && cd .. | ||
- cd tests/ | ||
- python3 -m unittest discover | ||
deploy: | ||
- provider: releases | ||
api_key: "$GITHUB_TOKEN" | ||
file_glob: true | ||
file: "$TRAVIS_BUILD_DIR/bundles/*" | ||
skip_cleanup: true | ||
overwrite: true | ||
on: | ||
tags: true | ||
- provider: pypi | ||
user: adafruit-travis | ||
on: | ||
tags: true | ||
password: | ||
secure: WYAvV+71bL0EjUV2MMmIuf/P0RNLBUGiHcjFZnvRhZriOP7MPSXoePG31k309mWE/0e26gxPWdZH/zpWEm5Vzb2RbGGvTypjD9u/c5HJqcLohVy9mPCqgvkJNQi+Sqe0u4XsMHMaueZd8vry+MLH5+h6Py7fjx/4MVZKHLxHdMI= |
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
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,8 +1,20 @@ | ||
"""A setuptools based setup module. | ||
See: | ||
https://packaging.python.org/en/latest/distributing.html | ||
https://github.com/pypa/sampleproject | ||
""" | ||
|
||
from ez_setup import use_setuptools | ||
use_setuptools() | ||
from setuptools import setup, find_packages | ||
# To use a consistent encoding | ||
from codecs import open | ||
from os import path | ||
import re | ||
|
||
|
||
# Get the version string from _version.py | ||
verstrline = open('Adafruit_IO/_version.py', "rt").read() | ||
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" | ||
mo = re.search(VSRE, verstrline, re.M) | ||
|
@@ -12,31 +24,49 @@ | |
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) | ||
print('version: ', verstr) | ||
|
||
# Get the long description from the README file | ||
here = path.abspath(path.dirname(__file__)) | ||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
classifiers = ['Development Status :: 5 - Production/Stable', | ||
'Operating System :: POSIX :: Linux', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: MacOS', | ||
'License :: OSI Approved :: MIT License', | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3', | ||
'Topic :: Software Development', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Topic :: Home Automation', | ||
'Topic :: System :: Hardware'] | ||
'Topic :: Software Development', | ||
'Topic :: Syste m :: Hardware'] | ||
|
||
setup( | ||
name = 'adafruit-io', | ||
version = verstr, | ||
use_scm_version = True, | ||
setup_requires = ['setuptools_scm'], | ||
|
||
description = 'Python client library for Adafruit IO (http://io.adafruit.com/).', | ||
long_description = open('README.rst').read(), | ||
long_description_content_type='text/x-rst', | ||
|
||
url = 'https://github.com/adafruit/io-client-python', | ||
|
||
author = 'Adafruit Industries', | ||
author_email = '[email protected]', | ||
packages = ['Adafruit_IO'], | ||
py_modules = ['ez_setup'], | ||
url = 'https://github.com/adafruit/io-client-python', | ||
|
||
license = 'MIT', | ||
keywords = 'Adafruit IO', | ||
classifiers = classifiers, | ||
|
||
|
||
version = verstr, | ||
install_requires = ["requests", "paho-mqtt"], | ||
python_requires = ">=3.4.0", | ||
description = 'Python client library for Adafruit IO (http://io.adafruit.com/).', | ||
long_description = open('README.rst').read(), | ||
install_requires = ["requests", "paho-mqtt"] | ||
|
||
|
||
|
||
packages = ['Adafruit_IO'], | ||
py_modules = ['ez_setup'], | ||
keywords = 'adafruitio io python circuitpython raspberrypi hardware MQTT', | ||
classifiers = classifiers | ||
) |