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
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 .
- python setup.py install
- pip install pylint Sphinx sphinx-rtd-theme
- pip 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/
- 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',
]
# 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)}
@ -35,17 +29,17 @@ master_doc = 'index'
# General information about the project.
project = u'io-client-python'
copyright = u'2018 Tony DiCola, Justin Cooper, Adam Bachman, Todd Treece, Brent Rubell'
author = u'Tony DiCola, Justin Cooper, Adam Bachman, Todd Treece, Brent Rubell'
copyright = u'2018 Adafruit Industries'
author = u'Adafruit Industries'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'2.0'
version = u'2.0.1'
# 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
# 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
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,50 @@ else:
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 :: Software Development',
'Topic :: System :: Hardware']
setup(
name = 'adafruit-io',
version = verstr,
author = 'Adafruit Industries',
author_email = 'adafruitio@adafruit.com',
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",
name = 'adafruit-io-python',
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(),
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
)