Skip to main content

CircuitPython library build tools

Project description

Adafruit CircuitPython Build Tools

Discord

This repo contains build scripts used to build the Adafruit CircuitPython bundle, CircuitPython Community bundle and individual library release zips. Its focused on Github Actions support but will also work locally when a gcc compiler is present.

The scripts will either fetch a pre-built mpy-cross from s3 or automatically clone the CircuitPython repo and attempt to build mpy-cross. You'll need some version of gcc for this to work.

Setting up libraries

These build tools automatically build .mpy files and zip them up for CircuitPython when a new tagged release is created. To add support to a repo you need to use the CircuitPython cookiecutter to generate .github/workflows/*.yml.

The bundle build will produce one zip file for every major CircuitPython release supported containing compatible mpy files and a zip with human readable py files. It'll also "release" a z-build_tools_version-x.x.x.ignore file that will be used to determine when a library needs new release files because the build tools themselves changed, such as when a new major CircuitPython release happens.

Building libraries locally

To build libraries built with the build tools you'll need to install the circuitpython-build-tools package.

python3 -m venv .env
source .env/bin/activate
pip install circuitpython-build-tools
circuitpython-build-bundles --filename_prefix <output file prefix> --library_location .

When making changes to circuitpython-build-tools itself, you can test your changes locally like so:

cd circuitpython-build-tools # this will be specific to your storage location
python3 -m venv .env
source .env/bin/activate
pip install -e .  # '-e' is pip's "development" install feature
circuitpython-build-bundles --filename_prefix <output file prefix> --library_location <library location> --library_depth 2

Contributing

Contributions are welcome! Please read our [Code of Conduct] (https://github.com/adafruit/Adafruit\_CircuitPython\_adabot/blob/master/CODE\_OF\_CONDUCT.md) before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circuitpython_build_tools-1.20.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

circuitpython_build_tools-1.20.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file circuitpython_build_tools-1.20.0.tar.gz.

File metadata

File hashes

Hashes for circuitpython_build_tools-1.20.0.tar.gz
Algorithm Hash digest
SHA256 f0bb3646d24de183db0e8baa0b24b1902217ed14d21add1d2b4920dff3669120
MD5 8c6de8ada17d9952ae183785ec0265c7
BLAKE2b-256 f5566f8fad615a3787990825f222aa6b5622b56cd8be5ce4e0a400be80f2b01d

See more details on using hashes here.

Provenance

The following attestation bundles were made for circuitpython_build_tools-1.20.0.tar.gz:

Publisher: release.yml on adafruit/circuitpython-build-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file circuitpython_build_tools-1.20.0-py3-none-any.whl.

File metadata

File hashes

Hashes for circuitpython_build_tools-1.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94b1d3df96b2f1f83c4782f79b01cae98c69640025565452de9744a2127a4ca0
MD5 233bd191ef545a123a3a3cd97aa8207b
BLAKE2b-256 85fbaa95a5ac5cb6f22f75fe1b0d6dffd87f52559e2aeb769f74fd2854ad6ca8

See more details on using hashes here.

Provenance

The following attestation bundles were made for circuitpython_build_tools-1.20.0-py3-none-any.whl:

Publisher: release.yml on adafruit/circuitpython-build-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page