Skip to content

Commit f44caab

Browse files
committed
Publish to PyPI.
1 parent 0a90cc0 commit f44caab

File tree

3 files changed

+136
-17
lines changed

3 files changed

+136
-17
lines changed

README.rst

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
Introduction
22
============
33

4+
45
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-nunchuk/badge/?version=latest
56
:target: https://docs.circuitpython.org/projects/nunchuk/en/latest/
67
:alt: Documentation Status
78

9+
810
.. image:: https://img.shields.io/discord/327254708534116352.svg
911
:target: https://adafru.it/discord
1012
:alt: Discord
1113

14+
1215
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk/workflows/Build%20CI/badge.svg
13-
:target: https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk/actions/
16+
:target: https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk/actions
1417
:alt: Build Status
1518

19+
20+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
21+
:target: https://github.com/psf/black
22+
:alt: Code Style: Black
23+
1624
CircuitPython library for Nintendo Nunchuk controller
1725

1826

@@ -25,7 +33,64 @@ This driver depends on:
2533

2634
Please ensure all dependencies are available on the CircuitPython filesystem.
2735
This is easily achieved by downloading
28-
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
36+
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
37+
or individual libraries can be installed using
38+
`circup <https://github.com/adafruit/circup>`_.
39+
40+
Works with the Wii controller (Nunchuck / Wiichuck).
41+
42+
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/342>`_
43+
44+
45+
Installing from PyPI
46+
=====================
47+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
48+
PyPI <https://pypi.org/project/adafruit-circuitpython-nunchuk/>`_.
49+
To install for current user:
50+
51+
.. code-block:: shell
52+
53+
pip3 install adafruit-circuitpython-nunchuk
54+
55+
To install system-wide (this may be required in some cases):
56+
57+
.. code-block:: shell
58+
59+
sudo pip3 install adafruit-circuitpython-nunchuk
60+
61+
To install in a virtual environment in your current project:
62+
63+
.. code-block:: shell
64+
65+
mkdir project-name && cd project-name
66+
python3 -m venv .env
67+
source .env/bin/activate
68+
pip3 install adafruit-circuitpython-nunchuk
69+
70+
71+
72+
Installing to a Connected CircuitPython Device with Circup
73+
==========================================================
74+
75+
Make sure that you have ``circup`` installed in your Python environment.
76+
Install it with the following command if necessary:
77+
78+
.. code-block:: shell
79+
80+
pip3 install circup
81+
82+
With ``circup`` installed and your CircuitPython device connected use the
83+
following command to install:
84+
85+
.. code-block:: shell
86+
87+
circup install nunchuk
88+
89+
Or the following command to update an existing version:
90+
91+
.. code-block:: shell
92+
93+
circup update
2994
3095
Usage Example
3196
=============
@@ -34,17 +99,14 @@ See nunchuk_simpletest.py in examples folder.
3499

35100
Documentation
36101
=============
37-
38102
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/nunchuk/en/latest/>`_.
39103

104+
For information on building library documentation, please check out
105+
`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
106+
40107
Contributing
41108
============
42109

43110
Contributions are welcome! Please read our `Code of Conduct
44-
<https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk/blob/master/CODE_OF_CONDUCT.md>`_
111+
<https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk/blob/HEAD/CODE_OF_CONDUCT.md>`_
45112
before contributing to help this project stay welcoming.
46-
47-
Documentation
48-
=============
49-
50-
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

setup.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2022 Carter Nelson for Adafruit Industries
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
"""A setuptools based setup module.
7+
8+
See:
9+
https://packaging.python.org/en/latest/distributing.html
10+
https://github.com/pypa/sampleproject
11+
"""
12+
13+
from setuptools import setup, find_packages
14+
15+
# To use a consistent encoding
16+
from codecs import open
17+
from os import path
18+
19+
here = path.abspath(path.dirname(__file__))
20+
21+
# Get the long description from the README file
22+
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
23+
long_description = f.read()
24+
25+
setup(
26+
# Adafruit Bundle Information
27+
name="adafruit-circuitpython-nunchuk",
28+
use_scm_version={
29+
# This is needed for the PyPI version munging in the Github Actions release.yml
30+
"git_describe_command": "git describe --tags --long",
31+
"local_scheme": "no-local-version",
32+
},
33+
setup_requires=["setuptools_scm"],
34+
description="CircuitPython library for Nintendo Nunchuk controller",
35+
long_description=long_description,
36+
long_description_content_type="text/x-rst",
37+
# The project's main homepage.
38+
url="https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk.git",
39+
# Author details
40+
author="Adafruit Industries",
41+
author_email="[email protected]",
42+
install_requires=[
43+
"Adafruit-Blinka",
44+
"adafruit-circuitpython-busdevice",
45+
],
46+
# Choose your license
47+
license="MIT",
48+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
49+
classifiers=[
50+
"Development Status :: 3 - Alpha",
51+
"Intended Audience :: Developers",
52+
"Topic :: Software Development :: Libraries",
53+
"Topic :: System :: Hardware",
54+
"License :: OSI Approved :: MIT License",
55+
"Programming Language :: Python :: 3",
56+
],
57+
# What does your project relate to?
58+
keywords="adafruit blinka circuitpython micropython nunchuk nunchuck nintendo controller",
59+
60+
# You can just specify the packages manually here if your project is
61+
# simple. Or you can use find_packages().
62+
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
63+
# CHANGE `py_modules=['...']` TO `packages=['...']`
64+
py_modules=["adafruit_nunchuk"],
65+
)

setup.py.disabled

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)