|
| 1 | +# CircuitPython Org Library Bundle |
| 2 | + |
| 3 | +[](https://circuitpython.readthedocs.io/en/latest/docs/drivers.html) [](https://adafru.it/discord) |
| 4 | + |
| 5 | +This repo bundles a bunch of useful CircuitPython libraries into an easy to |
| 6 | +download zip file. |
| 7 | + |
| 8 | +# License |
| 9 | +Each included library has its own license that must allow for redistribution. To |
| 10 | +save space, license text is not included in the bundle. However, a link to each |
| 11 | +individual repository is which should provide source code access and license |
| 12 | +information. |
| 13 | + |
| 14 | +# Use |
| 15 | +To use the bundle download the zip (not source zip) from the |
| 16 | +[latest release](https://github.com/circuitpython/CircuitPython_Org_Bundle/releases/latest), |
| 17 | +unzip it and copy over the subfolders, such as `lib`, into the root of your |
| 18 | +CircuitPython device. Make sure to indicate that it should be merged with the |
| 19 | +existing folder when it exists. |
| 20 | + |
| 21 | +# Development |
| 22 | + |
| 23 | +After you clone this repository you must run `git submodule init` on update |
| 24 | +also do `git submodule update`. |
| 25 | + |
| 26 | +## Updating libraries |
| 27 | +To update the libraries run `update-submodules.sh`. The script will fetch the |
| 28 | +latest code and update to the newest tag (not master). |
| 29 | + |
| 30 | +## Adding a library |
| 31 | +Determine the best location within `libraries` for the new library and then run: |
| 32 | + |
| 33 | + git submodule add <git url> libraries/<target directory> |
| 34 | + |
| 35 | +The target directory should omit any MicroPython or CircuitPython specific |
| 36 | +prefixes such as `CircuitPython_` to simplify the listing. |
| 37 | + |
| 38 | +You should make sure that the git url has the format `https://github.com/{:user}/{:repo}.git`, |
| 39 | +such as `https://github.com/tannewt/CircuitPython_Example.git`. Other forms may interfere with |
| 40 | +adabot scripts (see https://github.com/adafruit/adabot/issues/145 for details). |
| 41 | + |
| 42 | +## Removing a library |
| 43 | +Only do this if you are replacing the module with an equivalent: |
| 44 | + |
| 45 | + git submodule deinit libraries/<target directory> |
| 46 | + git rm libraries/<target directory> |
| 47 | + |
| 48 | +## Building the bundle |
| 49 | +To build this bundle locally you'll need to install the |
| 50 | +[circuitpython-build-tools](https://github.com/adafruit/circuitpython-build-tools>) package. |
| 51 | + |
| 52 | + python3 -m venv .env |
| 53 | + source .env/bin/activate |
| 54 | + pip install circuitpython-build-tools |
| 55 | + |
| 56 | +Once installed, make sure you are in the virtual environment: |
| 57 | + |
| 58 | + source .env/bin/activate |
| 59 | + |
| 60 | +Then run the build: |
| 61 | + |
| 62 | + ./build.sh |
0 commit comments