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 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.1.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.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for circuitpython_build_tools-1.20.1.tar.gz
Algorithm Hash digest
SHA256 a0f1d2a9adc965f3141b35017e5c4ad0ec530b7c406af08079642771f920b3a1
MD5 85c86dd9a5138e0bda459f62b5dc6f7a
BLAKE2b-256 3214700bbc52fc5d54d50d640882e2193b2f2f3a4bef371a86ef27336846c9d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for circuitpython_build_tools-1.20.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for circuitpython_build_tools-1.20.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9840189795aa172e98791fbcaf63c627cb324071e8b326fe2552cb1638c50577
MD5 8304215dc6293fffa1f1b0aeb5883f05
BLAKE2b-256 b969527519684128d516d0cdd05c52d88580b025846eab0324653931eb215b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for circuitpython_build_tools-1.20.1-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