adding autopypi releases..

This commit is contained in:
brentru 2018-07-12 16:05:05 -04:00
parent 0ba2691113
commit 406173eeb1
3 changed files with 72 additions and 39 deletions

View file

@ -1,22 +1,30 @@
# .travis.yml for Adafruit IO Python Client Library
language: python language: python
dist: trusty dist: trusty
sudo: required sudo: required
python: python:
- "3.6" - '3.6'
cache: cache:
pip: true pip: true
install: install:
- python setup.py install - python setup.py install
- pip install pylint Sphinx sphinx-rtd-theme - pip install pylint Sphinx sphinx-rtd-theme
- pip install . - pip install .
script: script:
- cd docs && sphinx-build -E -W -b html . _build/html - cd docs && sphinx-build -E -W -b html . _build/html && cd ..
- cd .. - cd tests/
- cd tests/ - python -m unittest discover
- python -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=

View file

@ -16,12 +16,6 @@ extensions = [
'sphinx.ext.todo', 'sphinx.ext.todo',
] ]
# TODO: Please Read!
# Uncomment the below if you use native CircuitPython modules such as
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
# autodoc_mock_imports = ["digitalio", "busio"]
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
@ -35,17 +29,17 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'io-client-python' project = u'io-client-python'
copyright = u'2018 Tony DiCola, Justin Cooper, Adam Bachman, Todd Treece, Brent Rubell' copyright = u'2018 Adafruit Industries'
author = u'Tony DiCola, Justin Cooper, Adam Bachman, Todd Treece, Brent Rubell' author = u'Adafruit Industries'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = u'2.0' version = u'2.0.1'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = u'2.0' release = u'2.0.1'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View file

@ -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 from ez_setup import use_setuptools
use_setuptools() use_setuptools()
from setuptools import setup, find_packages from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import re import re
# Get the version string from _version.py
verstrline = open('Adafruit_IO/_version.py', "rt").read() verstrline = open('Adafruit_IO/_version.py', "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M) mo = re.search(VSRE, verstrline, re.M)
@ -12,31 +24,50 @@ else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
print('version: ', verstr) 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', classifiers = ['Development Status :: 5 - Production/Stable',
'Operating System :: POSIX :: Linux', 'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows', 'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS', 'Operating System :: MacOS',
'License :: OSI Approved :: MIT License', 'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Topic :: Software Development', 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Home Automation', 'Topic :: Home Automation',
'Topic :: Software Development',
'Topic :: System :: Hardware'] 'Topic :: System :: Hardware']
setup( setup(
name = 'adafruit-io', name = 'adafruit-io-python',
version = verstr,
author = 'Adafruit Industries', use_scm_version = True,
author_email = 'adafruitio@adafruit.com', setup_requires = ['setuptools_scm'],
packages = ['Adafruit_IO'],
py_modules = ['ez_setup'],
url = 'https://github.com/adafruit/io-client-python',
license = 'MIT',
keywords = 'Adafruit IO',
classifiers = classifiers,
python_requires = ">=3.4.0",
description = 'Python client library for Adafruit IO (http://io.adafruit.com/).', description = 'Python client library for Adafruit IO (http://io.adafruit.com/).',
long_description = open('README.rst').read(), long_description = open('README.rst').read(),
install_requires = ["requests", "paho-mqtt"] long_description_content_type='text/x-rst',
url = 'https://github.com/adafruit/io-client-python',
author = 'Adafruit Industries',
author_email = 'adafruitio@adafruit.com',
license = 'MIT',
version = verstr,
install_requires = ["requests", "paho-mqtt"],
python_requires = ">=3.4.0",
packages = ['Adafruit_IO'],
py_modules = ['ez_setup'],
keywords = 'adafruitio io python circuitpython raspberrypi hardware MQTT',
classifiers = classifiers
) )