Skip to content

Commit

Permalink
Merge pull request #56 from adafruit/auto-pypi-work
Browse files Browse the repository at this point in the history
Builds release automatically to PyPi
  • Loading branch information
brentru authored Jul 12, 2018
2 parents b0658eb + 64fa940 commit 8070fbd
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 37 deletions.
38 changes: 23 additions & 15 deletions .travis.yml
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=
14 changes: 4 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
'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)}

Expand All @@ -35,17 +29,17 @@

# 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.
Expand Down
54 changes: 42 additions & 12 deletions setup.py
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)
Expand All @@ -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
)

0 comments on commit 8070fbd

Please sign in to comment.