Skip to content

Commit

Permalink
Update to setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Nov 9, 2021
1 parent 645d090 commit b2d41a7
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 70 deletions.
14 changes: 8 additions & 6 deletions Makefile
@@ -1,5 +1,5 @@
LIBRARY_VERSION=$(shell cat library/setup.py | grep version | awk -F"'" '{print $$2}')
LIBRARY_NAME=$(shell cat library/setup.py | grep name | awk -F"'" '{print $$2}')
LIBRARY_VERSION=$(shell grep version library/setup.cfg | awk -F" = " '{print $$2}')
LIBRARY_NAME=$(shell grep name library/setup.cfg | awk -F" = " '{print $$2}')

.PHONY: usage install uninstall
usage:
Expand All @@ -9,7 +9,7 @@ usage:
@echo "install: install the library locally from source"
@echo "uninstall: uninstall the local library"
@echo "check: peform basic integrity checks on the codebase"
@echo "python-readme: generate library/README.rst from README.md"
@echo "python-readme: generate library/README.md from README.md + library/CHANGELOG.txt"
@echo "python-wheels: build python .whl files for distribution"
@echo "python-sdist: build python source distribution"
@echo "python-clean: clean python build and dist directories"
Expand All @@ -36,12 +36,14 @@ check:
tag:
git tag -a "v${LIBRARY_VERSION}" -m "Version ${LIBRARY_VERSION}"

python-readme: library/README.rst
python-readme: library/README.md

python-license: library/LICENSE.txt

library/README.rst: README.md
pandoc --from=markdown --to=rst -o library/README.rst README.md
library/README.md: README.md library/CHANGELOG.txt
cp README.md library/README.md
printf "\n# Changelog\n\n" >> library/README.md
cat library/CHANGELOG.txt >> library/README.md

library/LICENSE.txt: LICENSE
cp LICENSE library/LICENSE.txt
Expand Down
2 changes: 1 addition & 1 deletion library/MANIFEST.in
@@ -1,5 +1,5 @@
include CHANGELOG.txt
include LICENSE.txt
include README.rst
include README.md
include setup.py
recursive-include drv2605 *.py
42 changes: 42 additions & 0 deletions library/README.md
@@ -0,0 +1,42 @@
# DRV2605 Haptic Driver

[![Build Status](https://travis-ci.com/pimoroni/drv2605-python.svg?branch=master)](https://travis-ci.com/pimoroni/drv2605-python)
[![Coverage Status](https://coveralls.io/repos/github/pimoroni/drv2605-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/drv2605-python?branch=master)
[![PyPi Package](https://img.shields.io/pypi/v/drv2605.svg)](https://pypi.python.org/pypi/drv2605)
[![Python Versions](https://img.shields.io/pypi/pyversions/drv2605.svg)](https://pypi.python.org/pypi/drv2605)


# Installing

Stable library from PyPi:

* Just run `sudo pip install drv2605`

Latest/development library from GitHub:

* `git clone https://github.com/pimoroni/drv2605-python`
* `cd drv2605-python`
* `sudo ./install.sh`

# Vibration Patterns

The DRV2605 has a library of built-in vibration patterns great for haptic feedback, notifications and more. For the complete list see:

http://www.ti.com/document-viewer/DRV2605/datasheet/waveform-library-effects-list-slos854718

# Changelog

0.0.3
-----

* Fix set_sequence, issue #2

0.0.2
-----

* Port to i2cdevice>=0.0.6 set/get API

0.0.1
-----

* Initial Release
29 changes: 0 additions & 29 deletions library/README.rst

This file was deleted.

45 changes: 44 additions & 1 deletion library/setup.cfg
@@ -1,6 +1,40 @@
# -*- coding: utf-8 -*-
[metadata]
name = drv2605
version = 0.0.3
author = Philip Howard
author_email = phil@pimoroni.com
description = Python library for the DRV2605 Haptic Driver
long_description = file: README.md
long_description_content_type = text/markdown
keywords = Raspberry Pi
url = https://www.pimoroni.com
project_urls =
GitHub=https://www.github.com/pimoroni/drv2605-python
license = MIT
# This includes the license file(s) in the wheel.
# https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
license_files = LICENSE.txt
classifiers =
Development Status :: 4 - Beta
Operating System :: POSIX :: Linux
License :: OSI Approved :: MIT License
Intended Audience :: Developers
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Topic :: Software Development
Topic :: Software Development :: Libraries
Topic :: System :: Hardware

[options]
python_requires = >= 2.7
packages = drv2605
install_requires =
i2cdevice>=0.0.6
smbus

[flake8]
exclude =
test.py
.tox,
.eggs,
.git,
Expand All @@ -9,3 +43,12 @@ exclude =
dist
ignore =
E501

[pimoroni]
py3only = true
py2deps =
py3deps =
configtxt =
commands =
printf "Setting up i2c...\n"
raspi-config nonint do_i2c 0
36 changes: 8 additions & 28 deletions library/setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python

# -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Pimoroni
Expand All @@ -22,32 +22,12 @@
SOFTWARE.
"""

try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from setuptools import setup, __version__
from pkg_resources import parse_version

minimum_version = parse_version('30.4.0')

classifiers = ['Development Status :: 4 - Beta',
'Operating System :: POSIX :: Linux',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Software Development',
'Topic :: System :: Hardware']
if parse_version(__version__) < minimum_version:
raise RuntimeError("Package setuptools must be at least version {}".format(minimum_version))

setup(
name='drv2605',
version='0.0.3',
author='Philip Howard',
author_email='phil@pimoroni.com',
description="""Python library for the DRV2605 Haptic Driver""",
long_description=open('README.rst').read() + '\n' + open('CHANGELOG.txt').read(),
license='MIT',
keywords='Raspberry Pi',
url='http://www.pimoroni.com',
classifiers=classifiers,
packages=['drv2605'],
install_requires=['i2cdevice>=0.0.6', 'smbus']
)
setup()
11 changes: 6 additions & 5 deletions library/tox.ini
Expand Up @@ -14,11 +14,12 @@ deps =

[testenv:qa]
commands =
check-manifest --ignore tox.ini,tests/*,.coveragerc
python setup.py sdist bdist_wheel
twine check dist/*
flake8 --ignore E501
rstcheck README.rst
make -C ../ check
deps =
check-manifest
flake8
rstcheck
whitelist_externals =
make
twine

0 comments on commit b2d41a7

Please sign in to comment.