Skip to content

PyPi setup #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
*.mpy
.idea
__pycache__
_build
*.pyc
.env
build*
bundles
*.DS_Store
.eggs
dist
**/*.egg-info
35 changes: 17 additions & 18 deletions .travis.yml
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
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 ..
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@

adafruit-circuitpython-busdevice
adafruit-circuitpython-register
69 changes: 54 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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='[email protected]',
classifiers = [
'Development Status :: 6 - Mature',
'Programming Language :: Python :: 3',
author_email='[email protected]',

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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been adding a somewhat more detailed keyword set along these lines: https://github.com/adafruit/Adafruit_CircuitPython_APDS9960/blob/master/setup.py#L55

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok would you like me to update it with more info?


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