diff --git a/.gitignore b/.gitignore index 0dd8629..cc1a9c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ +*.mpy +.idea __pycache__ _build *.pyc .env build* bundles +*.DS_Store +.eggs +dist +**/*.egg-info diff --git a/.travis.yml b/.travis.yml index 234851c..aa57313 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 + 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: YxpuY9eDrYRhWdp9P7Lev9gefE0iFud7K7bqPhZqFF2W+gS4QLrwzyJStEoivHZllEytOxTHl7DMvr5GWQHKa9vPPryCE5vPhM4Ec/ijuITYaC9vyL+YGwCEWsN9YGNnRra5FFZUyBt2rSK4aq5HOI8JKbxdsUgudGtUz5O2NFk9A0RG61HueGxmIwLN5xp2Xr0A4tqs9k4A+ZsqhyA+FqHtjYzF6ThAdpHbYDy677HJbUsDWuXdqMkmjuoKl6cAxe0Do6XrAO+Tp7JkiBUu9GfnTZiLKDLhqro0uVaIqQrJqTqW9mHUE704Q8bhX/ERhPwkTNVW9zek4lsm4/pNSvbK8g1W5PSgvKAgzrEU6zwJ4IkEFM8JPh2Wk+mZiR+iKPsO/lVlAs9gUh05z+AT6TTNscyzuLTuCrVeu9MlchslLCIrx8VEIeAzEy0mut0FAXhj6T9TlQ9zrkX5UCxgDn1PxVg8NI5l1OUVVRFb/E1gz27EbatnGszmx+I+gGe4Ta246eNUAcC3zAsnPFj5e3SMy0jZ+WLM4CbXXzVZ/j4rPGm5ppOAB89byjUgpTLAsCZEDeIclvAYzobv2ovEQ8TRdrp/JY/OQ5ybcGb6cypfaq7SBHeK/aLjecKsb5j5cEi1WVa6EMjP9ctq3YmHrTrNvFk5tdFtBeDVSmi/+1E= 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_pca9685.py - - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py) - - circuitpython-build-bundles --filename_prefix adafruit-circuitpython-pca9685 --library_location . - - cd docs && sphinx-build -E -W -b html . _build/html +- pylint adafruit_pca9685.py +- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py) +- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-pca9685 --library_location + . +- cd docs && sphinx-build -E -W -b html . _build/html && cd .. diff --git a/docs/conf.py b/docs/conf.py index 4f912ba..a307a23 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ 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)} # Libraries we depend on but don't need for generating docs. -autodoc_mock_imports = ['adafruit_bus_device', 'adafruit_register'] +# autodoc_mock_imports = ['adafruit_bus_device', 'adafruit_register'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/requirements.txt b/requirements.txt index 8b13789..81c33fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ - +adafruit-circuitpython-busdevice +adafruit-circuitpython-register \ No newline at end of file diff --git a/setup.py b/setup.py index c983a2e..a35936b 100644 --- a/setup.py +++ b/setup.py @@ -1,21 +1,60 @@ -from distutils.core import setup +"""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-pca9685', - packages=[ - 'adafruit_pca9685', - ],\ - version="2.0.0", - description="Driver for PCA9685 for Adafruit CircuitPython.", - long_description="""\ -This library lets you control the motor, stepper, and servo drivers based on PCA9685.""", + name='adafruit-circuitpython-pca9865', + + use_scm_version=True, + setup_requires=['setuptools_scm'], + + description='CircuitPython driver for motor, stepper, and servo based on PCA9865.', + long_description=long_description, + long_description_content_type='text/x-rst', + + # The project's main homepage. + url='https://github.com/adafruit/Adafruit_CircuitPython_PCA9865', + + # Author details author='Radomir Dopieralski & Adafruit Industries', - author_email='support@adafruit.com', - classifiers = [ - 'Development Status :: 6 - Mature', - 'Programming Language :: Python :: 3', + author_email='circuitpython@adafruit.com', + + install_requires=['adafruit-circuitpython-busdevice', 'adafruit-circuitpython-register'], + + # 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', ], - url="https://github.com/adafruit/Adafruit_CircuitPython_PCA9685" -) + + # What does your project relate to? + keywords='adafruit pca9865 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_pca9865'], +) \ No newline at end of file