Skip to content

Commit ed71b40

Browse files
authored
Merge pull request #19 from adafruit/dherrada-patch-1
Removed building locally section from README, replaced with documenta…
2 parents 395ddb7 + c2462e7 commit ed71b40

File tree

1 file changed

+28
-45
lines changed

1 file changed

+28
-45
lines changed

README.rst

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

55+
Installing from PyPI
56+
====================
57+
58+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
59+
PyPI <https://pypi.org/project/adafruit-circuitpython-ds3231/>`_. To install for current user:
60+
61+
.. code-block:: shell
62+
63+
pip3 install adafruit-circuitpython-ds3231
64+
65+
To install system-wide (this may be required in some cases):
66+
67+
.. code-block:: shell
68+
69+
sudo pip3 install adafruit-circuitpython-ds3231
70+
71+
To install in a virtual environment in your current project:
72+
73+
.. code-block:: shell
74+
75+
mkdir project-name && cd project-name
76+
python3 -m venv .env
77+
source .env/bin/activate
78+
pip3 install adafruit-circuitpython-ds3231
79+
5580
Usage Notes
5681
===========
5782

@@ -137,49 +162,7 @@ Contributions are welcome! Please read our `Code of Conduct
137162
<https://github.com/adafruit/Adafruit_CircuitPython_DS3231/blob/master/CODE_OF_CONDUCT.md>`_
138163
before contributing to help this project stay welcoming.
139164

140-
Building locally
141-
================
142-
143-
To build this library locally you'll need to install the
144-
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
145-
146-
.. code-block:: shell
147-
148-
python3 -m venv .env
149-
source .env/bin/activate
150-
pip install circuitpython-build-tools
151-
152-
Once installed, make sure you are in the virtual environment:
153-
154-
.. code-block:: shell
155-
156-
source .env/bin/activate
157-
158-
Then run the build:
159-
160-
.. code-block:: shell
161-
162-
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-ds3231 --library_location .
163-
164-
Sphinx documentation
165-
-----------------------
166-
167-
Sphinx is used to build the documentation based on rST files and comments in the code. First,
168-
install dependencies (feel free to reuse the virtual environment from above):
169-
170-
.. code-block:: shell
171-
172-
python3 -m venv .env
173-
source .env/bin/activate
174-
pip install Sphinx sphinx-rtd-theme
175-
176-
Now, once you have the virtual environment activated:
177-
178-
.. code-block:: shell
179-
180-
cd docs
181-
sphinx-build -E -W -b html . _build/html
165+
Documentation
166+
=============
182167

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