-
Notifications
You must be signed in to change notification settings - Fork 76
Replaced building locally section with documentation section #34
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,18 +20,28 @@ changes such as mode. For I2C, it manages the device address. | |
|
||
.. _bus_device_installation: | ||
|
||
Installation | ||
------------- | ||
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from | ||
PyPI <https://pypi.org/project/adafruit-circuitpython-busdevice/>`_. To install for current user: | ||
|
||
This library is **NOT** built into CircuitPython to make it easy to update. To | ||
install it either follow the directions below or `install the library | ||
bundle <bundle_installation>`_. | ||
.. code-block:: shell | ||
|
||
pip3 install adafruit-circuitpython-busdevice | ||
|
||
To install system-wide (this may be required in some cases): | ||
|
||
To install: | ||
.. code-block:: shell | ||
|
||
sudo pip3 install adafruit-circuitpython-busdevice | ||
|
||
To install in a virtual environment in your current project: | ||
|
||
#. Download and unzip the `latest release zip <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/releases>`_. | ||
#. Copy the unzipped ``adafruit_bus_device`` to the ``lib`` directory on the ``CIRCUITPY`` drive. | ||
.. code-block:: shell | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be a blank line between this and the line above it. |
||
|
||
mkdir project-name && cd project-name | ||
python3 -m venv .env | ||
source .env/bin/activate | ||
pip3 install adafruit-circuitpython-busdevice | ||
|
||
Usage Example | ||
============= | ||
|
||
|
@@ -44,50 +54,7 @@ Contributions are welcome! Please read our `Code of Conduct | |
<https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/blob/master/CODE_OF_CONDUCT.md>`_ | ||
before contributing to help this project stay welcoming. | ||
|
||
Building locally | ||
================ | ||
|
||
To build this library locally you'll need to install the | ||
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package. | ||
|
||
.. code-block:: shell | ||
|
||
python3 -m venv .env | ||
source .env/bin/activate | ||
pip install circuitpython-build-tools | ||
|
||
Once installed, make sure you are in the virtual environment: | ||
|
||
.. code-block:: shell | ||
|
||
source .env/bin/activate | ||
|
||
Then run the build: | ||
|
||
.. code-block:: shell | ||
|
||
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-busdevice --library_location . | ||
|
||
Sphinx documentation | ||
----------------------- | ||
|
||
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): | ||
|
||
.. code-block:: shell | ||
|
||
python3 -m venv .env | ||
source .env/bin/activate | ||
pip install Sphinx sphinx-rtd-theme | ||
|
||
Now, once you have the virtual environment activated: | ||
|
||
.. code-block:: shell | ||
|
||
cd docs | ||
sphinx-build -E -W -b html . _build/html | ||
|
||
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to | ||
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to | ||
locally verify it will pass. | ||
Documentation | ||
============= | ||
|
||
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>`_. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a blank line between this and the line above it.