Merge pull request #4 from adafruit/pypi_readme

add pypi instructions to README.rst
This commit is contained in:
Kattni 2018-08-09 14:03:06 -04:00 committed by GitHub
commit c64d6f7fc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 5 deletions

View file

@ -23,6 +23,7 @@ deploy:
install: install:
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme - pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme
- pip install --force-reinstall pylint==1.9.2
script: script:
- pylint adafruit_as726x.py - pylint adafruit_as726x.py
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py) - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)

View file

@ -15,8 +15,9 @@ Introduction
Driver for the AS726x spectral sensors Driver for the AS726x spectral sensors
Dependencies Installation and Dependencies
============= =============================
This driver depends on: This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_ * `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
@ -27,6 +28,26 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_. `the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
Installing from PyPI
--------------------
On the Raspberry Pi and other Linux systems, you can install the driver locally
`from PyPI <https://pypi.org/project/adafruit-circuitpython-as726x/>`_. To
install system-wide, use:
.. code-block:: shell
sudo pip3 install adafruit-circuitpython-as726x
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install adafruit-circuitpython-as726x
Contributing Contributing
============ ============
@ -34,7 +55,7 @@ Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/adafruit_CircuitPython_AS726x/blob/master/CODE_OF_CONDUCT.md>`_ <https://github.com/adafruit/adafruit_CircuitPython_AS726x/blob/master/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming. before contributing to help this project stay welcoming.
Building locally Building Locally
================ ================
Zip release files Zip release files
@ -61,8 +82,8 @@ Then run the build:
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-as726x --library_location . circuitpython-build-bundles --filename_prefix adafruit-circuitpython-as726x --library_location .
Sphinx documentation Sphinx Documentation
----------------------- --------------------
Sphinx is used to build the documentation based on rST files and comments in the code. First, Sphinx is used to build the documentation based on rST files and comments in the code. First,
install dependencies (feel free to reuse the virtual environment from above): install dependencies (feel free to reuse the virtual environment from above):