Skip to content

Commit 3a7961b

Browse files
committed
rename & reformat README.md to README.rst
1 parent f6d1178 commit 3a7961b

File tree

2 files changed

+97
-64
lines changed

2 files changed

+97
-64
lines changed

README.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

README.rst

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
Adafruit CircuitPython Library Bundle
2+
=======================================
3+
4+
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-bundle/badge/?version=latest
5+
:target: https://circuitpython.readthedocs.io/projects/bundle/en/latest/
6+
:alt: Documentation Status
7+
8+
.. image:: https://img.shields.io/discord/327254708534116352.svg
9+
:target: https://discord.gg/nBQh6qu
10+
:alt: Discord
11+
12+
.. image:: https://travis-ci.com/adafruit/Adafruit_CircuitPython_Bundle.svg?branch=master
13+
:target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_Bundle
14+
:alt: Build Status
15+
16+
This repo bundles a bunch of useful CircuitPython libraries into an easy to
17+
download zip file. CircuitPython boards can ship with the contents of the zip to
18+
make it easy to provide a lot of libraries by default.
19+
20+
Use
21+
=====
22+
To use the bundle download the zip (not source zip) from the
23+
`latest release <https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest>`_,
24+
unzip it and copy over the subfolders, such as ``lib``, into the root of your
25+
CircuitPython device. Make sure to indicate that it should be merged with the
26+
existing folder when it exists.
27+
28+
CPython
29+
--------
30+
**DO NOT** use this to install libraries on a Linux computer, such as the Raspberry Pi,
31+
with regular Python (aka CPython). Instead, use the python3 version of ``pip`` to install
32+
the libraries you want to use. It will automatically install dependencies for you. For example:
33+
34+
.. code::
35+
36+
pip3 install adafruit-circuitpython-lis3dh
37+
38+
Development
39+
============
40+
41+
After you clone this repository you must run ``git submodule init``
42+
and then ``git submodule update``.
43+
44+
Updating libraries
45+
-------------------
46+
To update the libraries run ``update-submodules.sh``. The script will fetch the
47+
latest code and update to the newest tag (not master).
48+
49+
To find libraries with commits that haven't been included in a release do:
50+
51+
.. code::
52+
53+
git submodule foreach "git log --oneline HEAD...origin/master"
54+
55+
Adding a library
56+
-----------------
57+
Determine the best location within ``libraries`` (``libraries/drivers/`` or
58+
``libraries/helpers/``)for the new library and then run:
59+
60+
.. code::
61+
62+
git submodule add <git url> libraries/<target directory>
63+
64+
The target directory should omit any CircuitPython specific prefixes such as
65+
``adafruit-circuitpython`` to simplify the listing.
66+
67+
Removing a library
68+
-------------------
69+
Only do this if you are replacing the module with an equivalent:
70+
71+
.. code::
72+
73+
git submodule deinit libraries/<target directory>
74+
git rm libraries/<target directory>
75+
76+
Building the bundle
77+
--------------------
78+
To build this bundle locally you'll need to install the
79+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
80+
81+
.. code::
82+
83+
python3 -m venv .env
84+
source .env/bin/activate
85+
pip install circuitpython-build-tools
86+
87+
Once installed, make sure you are in the virtual environment:
88+
89+
.. code::
90+
91+
source .env/bin/activate
92+
93+
Then run the build:
94+
95+
.. code::
96+
97+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2

0 commit comments

Comments
 (0)