44
55This repo contains build scripts used to build the
66[ Adafruit CircuitPython bundle] ( https://github.com/adafruit/Adafruit_CircuitPython_Bundle ) , [ CircuitPython Community bundle] ( https://github.com/adafruit/CircuitPython_Community_Bundle )
7- and individual library release zips on Travis CI.
7+ and individual library release zips. Its focused on Travis CI support but will also work locally
8+ when a gcc compiler is present.
89
9- The pip package includes mpy-crosses that run on Travis. They will likely not
10- work in other environments.
10+ The pip package includes mpy-crosses that run on Travis. When building locally, the scripts will
11+ automatically clone the [ CircuitPython repo] ( https://github.com/adafruit/circuitpython ) and attempt
12+ to build mpy-crosses. You'll need some version of gcc for this to work.
1113
1214## Setting up libraries
1315
1416These build tools are intended for use with [ Travis CI] ( https://travis-ci.org )
1517to automatically build .mpy files and zip them up for CircuitPython when a new
16- tagged release is created. This file is relatively generic and can be shared
17- across multiple repositories by following these steps:
18+ tagged release is created. To add support to a repo you need to:
1819
19- 1 . Use the [ CircuitPython cookiecutter] ( https://github.com/adafruit/cookiecutter-adafruit-circuitpython ) to generate .travis.yml and requirements.txt .
20+ 1 . Use the [ CircuitPython cookiecutter] ( https://github.com/adafruit/cookiecutter-adafruit-circuitpython ) to generate .travis.yml.
2021 2 . For adafruit repositories, simply give the CircuitPythonLibrarians team
2122 write access to the repo and Adabot will do the rest.
2223
@@ -34,24 +35,24 @@ across multiple repositories by following these steps:
3435 Add an environment variable named GITHUB_TOKEN and set it to the value
3536 of the GitHub personal access token above. Keep 'Display value in build
3637 log' flipped off.
37- 5 . That's it! Tag a release and Travis should go to work to add .mpy files
38+ 5 . That's it! Tag a release and Travis should go to work to add zipped .mpy files
3839 to the release. It takes about a 2-3 minutes for a worker to spin up,
3940 build mpy-cross, and add the binaries to the release.
4041
4142The bundle build will produce one zip file for every major CircuitPython
42- release containing compatible mpy files and a zip with human readable py files.
43+ release supported containing compatible mpy files and a zip with human readable py files.
4344It'll also "release" a ` z-build_tools_version-x.x.x.ignore ` file that will be
4445used to determine when a library needs new release files because the build tools
45- themselves changed such as when a new major CircuitPython release happens.
46+ themselves changed, such as when a new major CircuitPython release happens.
4647
4748## Building libraries locally
4849
4950To build libraries built with the build tools you'll need to install the
50- circuitpython-travis- build-tools package.
51+ circuitpython-build-tools package.
5152
5253``` shell
5354python3 -m venv .env
5455source .env/bin/activate
55- pip install -r requirements.txt
56+ pip install circuitpython-build-tools
5657circuitpython-build-bundles --filename_prefix < output file prefix> --library_location .
5758```
0 commit comments