Skip to content

Commit 1cae26f

Browse files
authored
Merge pull request #17 from adafruit/dherrada-patch-1
Removed building locally section from README, replaced with documenta…
2 parents 300a052 + e971c5d commit 1cae26f

File tree

1 file changed

+28
-46
lines changed

1 file changed

+28
-46
lines changed

README.rst

Lines changed: 28 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,31 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
2727
This is easily achieved by downloading
2828
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
2929

30+
Installing from PyPI
31+
====================
32+
33+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
34+
PyPI <https://pypi.org/project/adafruit-circuitpython-rtttl/>`_. To install for current user:
35+
36+
.. code-block:: shell
37+
38+
pip3 install adafruit-circuitpython-rtttl
39+
40+
To install system-wide (this may be required in some cases):
41+
42+
.. code-block:: shell
43+
44+
sudo pip3 install adafruit-circuitpython-rtttl
45+
46+
To install in a virtual environment in your current project:
47+
48+
.. code-block:: shell
49+
50+
mkdir project-name && cd project-name
51+
python3 -m venv .env
52+
source .env/bin/activate
53+
pip3 install adafruit-circuitpython-rtttl
54+
3055
Usage Example
3156
=============
3257

@@ -62,50 +87,7 @@ Contributions are welcome! Please read our `Code of Conduct
6287
<https://github.com/adafruit/Adafruit_CircuitPython_rtttl/blob/master/CODE_OF_CONDUCT.md>`_
6388
before contributing to help this project stay welcoming.
6489

65-
Building locally
66-
================
67-
68-
To build this library locally you'll need to install the
69-
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
70-
71-
.. code-block:: shell
72-
73-
python3 -m venv .env
74-
source .env/bin/activate
75-
pip install circuitpython-build-tools
76-
77-
Once installed, make sure you are in the virtual environment:
78-
79-
.. code-block:: shell
80-
81-
source .env/bin/activate
82-
83-
Then run the build:
84-
85-
.. code-block:: shell
86-
87-
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-rtttl --library_location .
88-
89-
Sphinx documentation
90-
-----------------------
91-
92-
Sphinx is used to build the documentation based on rST files and comments in the code. First,
93-
install dependencies (feel free to reuse the virtual environment from above):
94-
95-
.. code-block:: shell
96-
97-
python3 -m venv .env
98-
source .env/bin/activate
99-
pip install Sphinx sphinx-rtd-theme
100-
101-
Now, once you have the virtual environment activated:
102-
103-
.. code-block:: shell
104-
105-
cd docs
106-
sphinx-build -E -W -b html . _build/html
107-
108-
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
109-
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
110-
locally verify it will pass.
90+
Documentation
91+
=============
11192

93+
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)