prepare to pypi

This commit is contained in:
ladyada 2018-07-01 17:36:44 -04:00
parent d2689d073f
commit aedba1d651
3 changed files with 78 additions and 21 deletions

View file

@ -1,31 +1,30 @@
# 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
on:
tags: true
- provider: pypi
user: adafruit-travis
on:
tags: true
password:
secure: 0CZ+qfOF9R7Ftny7oarpRw7RkA3dMHiy1SCFeFV9jAYf9OM1rxNMK2jOZD2A0oLUvNeBG69sfY2spWcryCMZYPCz5U+ZZaS0srvVu4M9ZQNX5LLCiYncxlhAt0x03X3L80ok+M9+pjPzC9JlWc+Fk+kvyhF/WEh/J3GOCuj91LJ2IpXCdoUWkUm8uLE5JsHOZJUg9kT37XmUgx6v9Ld7s7wpFn3jDFdBccL9bMF+Qu/gj7NLBKRmpGVo2sJNziXwSimUCijbRAgI/o+lBbf1WDs6PnXC8jkmYgyT5m2wxkYSiPecrXut2wVKlncfFmSsYTdp6Uwi3ZWViW22wID4c0OKZgsPwNgIvuBkBQAEz+DEsxmBysOGgPLG5dW8ZqCJrTU89FkgwQxX0RR3/oQB3AIeNhaBqzRX4PwskcdzA5x0V636xd5W7qsqgfvGbMfHweHMao5ZL0OtWduvfp3KupoLeBWd/ruRne0dnNNlpy+oLeomdCvtqUPeA1z1zmhJOYZb87tfa0wlpOH8n5iw59KOXYJSSvFA5+Zly432Yd2bXpARedviFOeqbBSSxgd0HVDXrS5Ik7pbxgZBQsW9os6U7TqWSghi2mI5ubiqMUWB2pBLLZAXweWcUu8aSmUHzbnebSbMB9qruDytk3sX94brrRDzPurZen1P99h+Tlo=
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_bme680.py
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py)
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bme680 --library_location .
- cd docs && sphinx-build -E -W -b html . _build/html
- pylint adafruit_bme680.py
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py)
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bme680 --library_location
.
- cd docs && sphinx-build -E -W -b html . _build/html && cd ..

View file

@ -15,8 +15,6 @@ extensions = [
'sphinx.ext.viewcode',
]
autodoc_mock_imports = ['micropython']
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
# Add any paths that contain templates here, relative to this directory.

60
setup.py Normal file
View file

@ -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-bme680',
use_scm_version=True,
setup_requires=['setuptools_scm'],
description='CircuitPython library for controlling a BME680 sensor chip.',
long_description=long_description,
long_description_content_type='text/x-rst',
# The project's main homepage.
url='https://github.com/adafruit/Adafruit_CircuitPython_BME680',
# 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 bme680 hardware micropython circuitpython',
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
py_modules=['adafruit_bme680'],
)