pypi support
This commit is contained in:
parent
b3c283172e
commit
23f8c480eb
2 changed files with 80 additions and 20 deletions
40
.travis.yml
40
.travis.yml
|
@ -1,33 +1,33 @@
|
|||
# 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: nBHtHXn+sDVKcUEXz59SZDoyzAZ1g0Q51AVuPJC3DjrUtKM4qnxLne+/21Kh2EEoVzquoPoEJ7tI5E2uSK1WDAPu5N6uiQ1/aYc+dIbaGHpXW5HZl3mvGoKxaiA2iGJ/lhP5+8yvZRQWFK7FqQCka5nCjFDUtvm/OvgViyOpaU5ib0gDJzVOfvz5xOwleI77zh5V1990ncAoaH4ZKyJ9QQsm3w30VemrBcUqhJNN5zXcpieAu5xicSiDQ80u/tyHmnfNWQ0lI/3i9vkAeWaqkkVORpXgO6cRvSAp/0YL8CJdZ/cgHD5B3mwPeCSimqatGNtoBukVC+UuOIPVOS4CWwBdXpI4poZNVraZIcY1INjnxE8VdIovM3NAfE/wSW/kWoTzEdTT+AAqUHns8HlDxO+bh9K/TzjLxJxfUc8rDDRw3Xi2LLhw8PabwvdaVr8sdjQHxL5aonm/NR3lumNoC2RF7yrTXCQihlxXLMHa5FyGiIxhe0Fox6l+FnB+XSvHVe8Lohvlf8KjJxeqq18rWpg8Qw6LfReuEjw3lY7O0MZq9u5eQzXR5w8XPSzOil0Va2auQhFFdPUqXa4ZJL/MnOnDqzxnjm8+ppMppcgvl3FTGsRfESJ0wW4Yar7OFVrLA2Pwad1sOskUC30Zf+23WmCrpL3VsUcbsdtQ2FYiZtU=
|
||||
install:
|
||||
- pip install circuitpython-build-tools Sphinx sphinx-rtd-theme
|
||||
- pip install --force-reinstall pylint==1.9.2
|
||||
|
||||
- pip install -r requirements.txt
|
||||
- pip install circuitpython-build-tools Sphinx sphinx-rtd-theme
|
||||
- pip install --force-reinstall pylint==1.9.2
|
||||
script:
|
||||
- pylint adafruit_pn532.py
|
||||
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
|
||||
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-pn532 --library_location .
|
||||
- cd docs && sphinx-build -E -W -b html . _build/html
|
||||
- pylint adafruit_pn532.py
|
||||
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace
|
||||
examples/*.py)
|
||||
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-pn532 --library_location
|
||||
.
|
||||
- cd docs && sphinx-build -E -W -b html . _build/html && cd ..
|
||||
|
|
60
setup.py
Normal file
60
setup.py
Normal 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-pn532',
|
||||
|
||||
use_scm_version=True,
|
||||
setup_requires=['setuptools_scm'],
|
||||
|
||||
description='CircuitPython library for controlling PN532 RFID/NFC reader-writer.',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/x-rst',
|
||||
|
||||
# The project's main homepage.
|
||||
url='https://github.com/adafruit/Adafruit_CircuitPython_PN532',
|
||||
|
||||
# Author details
|
||||
author='Adafruit Industries',
|
||||
author_email='circuitpython@adafruit.com',
|
||||
|
||||
install_requires=['Adafruit-Blinka', 'adafruit-circuitpython-busdevice', 'pyserial'],
|
||||
|
||||
# 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 pn532 rfid nfc 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_pn532'],
|
||||
)
|
Loading…
Reference in a new issue