Skip to content

Commit 84d0bf7

Browse files
committed
add Blinka to 'setup.py->install_requires'; add PyPI install & standard stuff to README
1 parent 5feb973 commit 84d0bf7

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

README.rst

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ libraries. Please ensure they are also available on the CircuitPython filesystem
3939
This is easily achieved by downloading
4040
`a library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
4141

42+
Installing from PyPI
43+
--------------------
44+
If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
45+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
46+
PyPI <https://pypi.org/project/adafruit-circuitpython-pcf8523/>`_. To install for current user:
47+
48+
.. code-block:: shell
49+
50+
pip3 install adafruit-circuitpython-pcf8523
51+
52+
To install system-wide (this may be required in some cases):
53+
54+
.. code-block:: shell
55+
56+
sudo pip3 install adafruit-circuitpython-pcf8523
57+
58+
To install in a virtual environment in your current project:
59+
60+
.. code-block:: shell
61+
62+
mkdir project-name && cd project-name
63+
python3 -m venv .env
64+
source .env/bin/activate
65+
pip3 install adafruit-circuitpython-pcf8523
66+
67+
4268
Usage Notes
4369
===========
4470

@@ -115,3 +141,61 @@ After the RTC is set, you retrieve the alarm status by reading the
115141
if rtc.alarm_status:
116142
print("wake up!")
117143
rtc.alarm_status = False
144+
145+
Contributing
146+
============
147+
148+
Contributions are welcome! Please read our `Code of Conduct
149+
<https://github.com/adafruit/Adafruit_CircuitPython_PCF8523/blob/master/CODE_OF_CONDUCT.md>`_
150+
before contributing to help this project stay welcoming.
151+
152+
Building locally
153+
================
154+
155+
Zip release files
156+
-----------------
157+
158+
To build this library locally you'll need to install the
159+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
160+
161+
.. code-block:: shell
162+
163+
python3 -m venv .env
164+
source .env/bin/activate
165+
pip install circuitpython-build-tools
166+
167+
Once installed, make sure you are in the virtual environment:
168+
169+
.. code-block:: shell
170+
171+
source .env/bin/activate
172+
173+
Then run the build:
174+
175+
.. code-block:: shell
176+
177+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-pcf8523 --library_location .
178+
179+
Sphinx documentation
180+
-----------------------
181+
182+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
183+
install dependencies (feel free to reuse the virtual environment from above):
184+
185+
.. code-block:: shell
186+
187+
python3 -m venv .env
188+
source .env/bin/activate
189+
pip install Sphinx sphinx-rtd-theme
190+
191+
Now, once you have the virtual environment activated:
192+
193+
.. code-block:: shell
194+
195+
cd docs
196+
sphinx-build -E -W -b html . _build/html
197+
198+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
199+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
200+
locally verify it will pass.
201+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
author='Adafruit Industries',
3535
author_email='[email protected]',
3636

37-
install_requires=['adafruit-circuitpython-register', 'adafruit-circuitpython-busdevice'],
37+
install_requires=['Adafruit-Blinka', 'adafruit-circuitpython-register', 'adafruit-circuitpython-busdevice'],
3838

3939
# Choose your license
4040
license='MIT',

0 commit comments

Comments
 (0)