Skip to content

Commit

Permalink
Auto-release to pypi too
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Jun 29, 2018
1 parent 06e89a8 commit abab0a9
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 22 deletions.
37 changes: 18 additions & 19 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
# This is a common .travis.yml for generating library release zip files for
# CircuitPython library releases using circuitpython-build-tools.
# See https://github.com/adafruit/circuitpython-build-tools for detailed setup
# instructions.

dist: trusty
sudo: false
language: python
python:
- "3.6"

- '3.6'
cache:
pip: true

pip: true
deploy:
provider: releases
api_key: $GITHUB_TOKEN
- provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: $TRAVIS_BUILD_DIR/bundles/*
file: "$TRAVIS_BUILD_DIR/bundles/*"
skip_cleanup: true
overwrite: true
on:
tags: true

- provider: pypi
user: adafruit-travis
on:
tags: true
password:
secure: oqlm4dJIzX2JH8Qbd+qU0g+M+1NSHD0f9pWQxvdhl+JlCtzRmBtyv6t24EN+SUGD3eKOK9A21/+QxsQJ2sB8/g8qh07OUNKw+erv9NqA2Wc0oHvOpwpN+TkS6hF0GI/Tn53hwm+qiTsXmBfbDoXDyu6Qe9rsht7Llv1wbHErCk7vkZ9zEL0zfhkgV5hzXPoRdwQclLeyleoJMyw0ZdfPqupMCGGAMPd6aTIYQfJ1PVmzYu9VqtK7yEB9lltc6U16dwp2huN2HBz5EzlRWszCli8mx1+MuZxNFlYkMo8vgWpSQmJpw22nSzI8ez57QibNGEm9u4Y9nb7PlzH9ZOeTVI7OZ9k3BPSN0db8WKGLz9VJxyTilqPNs737TCf36tdshPnuEtEDwk8YNReyK5uE5TnjnnXL2g3qSyhIniKLusY5d9cF3PEhwG6DcNqt39NrT6rG9PaeURYzKY19BgwhWD2CucEM6RDBRp+31citzM35NjET+5+xSOmDXdCdr+Ar+AWNxyfGn0N+Za/de8JyFjuk5TN4muB61eJPXPpinn8+egNyeiONPT96vJDVvFrEdG3bIEspYd6ZAMQ8Aou1Ii+CxOEXiY+57AK20LAieX8Nv2sTLLHo5wa7c4xghHVZdN187cesqm0LZtNYGhs/CeMP+9bC3bn7/IHGdcRZvg4=
install:
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme

- pip install -r requirements.txt
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme
script:
- pylint adafruit_seesaw/*.py
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py)
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-seesaw --library_location .
- cd docs && sphinx-build -E -W -b html . _build/html
- pylint adafruit_seesaw/*.py
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py)
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-seesaw --library_location
.
- cd docs && sphinx-build -E -W -b html . _build/html && cd ..
2 changes: 1 addition & 1 deletion docs/conf.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# 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 = ["adafruit_bus_device", "micropython", "digitalio", "struct"]
autodoc_mock_imports = []

intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),'Register': ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
adafruit-circuitpython-bus-device
adafruit-circuitpython-register
adafruit-circuitpython-busdevice
Adafruit-Blinka
60 changes: 60 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

setup(
name='adafruit-circuitpython-seesaw',

use_scm_version=True,
setup_requires=['setuptools_scm'],

description='CircuitPython library for controlling a SeeSaw helper chip.',
long_description=long_description,
long_description_content_type='text/x-rst',

# The project's main homepage.
url='https://github.com/adafruit/Adafruit_CircuitPython_seesaw',

# Author details
author='Adafruit Industries',
author_email='circuitpython@adafruit.com',

install_requires=["Adafruit-Blinka", "adafruit-circuitpython-busdevice"],

# Choose your license
license='MIT',

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Hardware',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],

# What does your project relate to?
keywords='adafruit seesaw hardware micropython circuitpython',

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=['adafruit_seesaw'],
)

0 comments on commit abab0a9

Please sign in to comment.