Skip to content

Commit c8c8963

Browse files
authored
Merge pull request #11 from adafruit/dherrada-patch-1
Removed building locally section from README, replaced with documenta…
2 parents f08a486 + ab359e1 commit c8c8963

File tree

1 file changed

+28
-48
lines changed

1 file changed

+28
-48
lines changed

README.rst

+28-48
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,31 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
3030
This is easily achieved by downloading
3131
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
3232

33+
Installing from PyPI
34+
====================
35+
36+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
37+
PyPI <https://pypi.org/project/adafruit-circuitpython-trellis/>`_. To install for current user:
38+
39+
.. code-block:: shell
40+
41+
pip3 install adafruit-circuitpython-trellis
42+
43+
To install system-wide (this may be required in some cases):
44+
45+
.. code-block:: shell
46+
47+
sudo pip3 install adafruit-circuitpython-trellis
48+
49+
To install in a virtual environment in your current project:
50+
51+
.. code-block:: shell
52+
53+
mkdir project-name && cd project-name
54+
python3 -m venv .env
55+
source .env/bin/activate
56+
pip3 install adafruit-circuitpython-trellis
57+
3358
Usage Example
3459
=============
3560
See `examples/trellis_simpletest.py <https://github.com/adafruit/Adafruit_CircuitPython_Trellis/examples/trellis_simpletest.py>`_ for full
@@ -65,52 +90,7 @@ Contributions are welcome! Please read our `Code of Conduct
6590
<https://github.com/adafruit/adafruit_CircuitPython_Trellis/blob/master/CODE_OF_CONDUCT.md>`_
6691
before contributing to help this project stay welcoming.
6792

68-
Building locally
69-
================
70-
71-
Zip release files
72-
-----------------
73-
74-
To build this library locally you'll need to install the
75-
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
76-
77-
.. code-block:: shell
78-
79-
python3 -m venv .env
80-
source .env/bin/activate
81-
pip install circuitpython-build-tools
82-
83-
Once installed, make sure you are in the virtual environment:
84-
85-
.. code-block:: shell
86-
87-
source .env/bin/activate
88-
89-
Then run the build:
90-
91-
.. code-block:: shell
92-
93-
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-trellis --library_location .
94-
95-
Sphinx documentation
96-
-----------------------
97-
98-
Sphinx is used to build the documentation based on rST files and comments in the code. First,
99-
install dependencies (feel free to reuse the virtual environment from above):
100-
101-
.. code-block:: shell
102-
103-
python3 -m venv .env
104-
source .env/bin/activate
105-
pip install Sphinx sphinx-rtd-theme
106-
107-
Now, once you have the virtual environment activated:
108-
109-
.. code-block:: shell
110-
111-
cd docs
112-
sphinx-build -E -W -b html . _build/html
93+
Documentation
94+
=============
11395

114-
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
115-
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
116-
locally verify it will pass.
96+
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>`_.

0 commit comments

Comments
 (0)