Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adafruit/circuitpython-build-tools
Build scripts for CircuitPython libraries and the bundle
https://github.com/adafruit/circuitpython-build-tools
circuitpython
Last synced: 3 days ago
JSON representation
Build scripts for CircuitPython libraries and the bundle
- Host: GitHub
- URL: https://github.com/adafruit/circuitpython-build-tools
- Owner: adafruit
- License: mit
- Created: 2017-11-17T02:41:26.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-01-05T19:42:49.000Z (about 1 month ago)
- Last Synced: 2025-01-28T22:37:48.486Z (10 days ago)
- Topics: circuitpython
- Language: Python
- Size: 194 KB
- Stars: 29
- Watchers: 21
- Forks: 17
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Adafruit CircuitPython Build Tools
[![Discord](https://img.shields.io/discord/327254708534116352.svg)](https://adafru.it/discord)
This repo contains build scripts used to build the
[Adafruit CircuitPython bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle), [CircuitPython Community bundle](https://github.com/adafruit/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](https://github.com/adafruit/circuitpython) 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](https://github.com/adafruit/cookiecutter-adafruit-circuitpython)
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.```shell
python3 -m venv .env
source .env/bin/activate
pip install circuitpython-build-tools
circuitpython-build-bundles --filename_prefix --library_location .
```When making changes to `circuitpython-build-tools` itself, you can test your changes
locally like so:```shell
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 --library_location
```## 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.