Skip to content

Commit 3e6b7f1

Browse files
authored
Merge pull request #34 from adafruit/dherrada-patch-1
Removed building locally section from README, replaced with documenta…
2 parents 12fd2b1 + 39f4ad4 commit 3e6b7f1

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-ssd1306/>`_. To install for current user:
38+
39+
.. code-block:: shell
40+
41+
pip3 install adafruit-circuitpython-ssd1306
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-ssd1306
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-ssd1306
57+
3358
Usage Example
3459
=============
3560

@@ -75,52 +100,7 @@ Contributions are welcome! Please read our `Code of Conduct
75100
<https://github.com/adafruit/adafruit_CircuitPython_SSD1306/blob/master/CODE_OF_CONDUCT.md>`_
76101
before contributing to help this project stay welcoming.
77102

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

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