All Projects → adafruit → circuitpython-build-tools

adafruit / circuitpython-build-tools

Licence: MIT license
Build scripts for CircuitPython libraries and the bundle

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to circuitpython-build-tools

PyDOS
DOS-like OS for microcontroller boards running Micropython or Circuitpython
Stars: ✭ 40 (+100%)
Mutual labels:  circuitpython
Adafruit CircuitPython MiniMQTT
MQTT Client Library for CircuitPython
Stars: ✭ 51 (+155%)
Mutual labels:  circuitpython
CircuitPython nRF24L01
CircuitPython driver library for the nRF24L01 transceiver.
Stars: ✭ 25 (+25%)
Mutual labels:  circuitpython
CircuitPython-online-IDE
CircuitPython online IDE
Stars: ✭ 15 (-25%)
Mutual labels:  circuitpython
kerntroller
No description or website provided.
Stars: ✭ 31 (+55%)
Mutual labels:  circuitpython
Adafruit CircuitPython AMG88xx
circuit python driver from AMG88xx GRID-EYE 8x8 IR sensor
Stars: ✭ 33 (+65%)
Mutual labels:  circuitpython
lightroom-macro-pad
Lightroom Macro Pad With CircuitPython Boards
Stars: ✭ 33 (+65%)
Mutual labels:  circuitpython
circuitpython
CircuitPython - a Python implementation for teaching coding with microcontrollers
Stars: ✭ 3,097 (+15385%)
Mutual labels:  circuitpython
Adafruit CircuitPython SD
SD card drivers for Adafruit CircuitPython
Stars: ✭ 24 (+20%)
Mutual labels:  circuitpython
awesome-micropythons
The many forks & ports of MicroPython
Stars: ✭ 35 (+75%)
Mutual labels:  circuitpython
adafruit-circuitpython-weekly-meeting
Notes from the weekly circuitpython meetings on Discord
Stars: ✭ 22 (+10%)
Mutual labels:  circuitpython
Big Honking Button
A simple Eurorack sampler and performance module in a silly package.
Stars: ✭ 45 (+125%)
Mutual labels:  circuitpython
Adafruit CircuitPython BNO055
CircuitPython driver for BNO055 absolute orientation sensor
Stars: ✭ 70 (+250%)
Mutual labels:  circuitpython
awesome-macropad
A curated list of awesome applications, macros, 3d printed cases, guides, and more for the Adafruit CircuitPython rp2040 Macropad.
Stars: ✭ 26 (+30%)
Mutual labels:  circuitpython
qtpy-knob
QT Py Media Knob using rotary encoder & neopixel ring
Stars: ✭ 49 (+145%)
Mutual labels:  circuitpython
usbhostcopro
USB Host Co-processor
Stars: ✭ 54 (+170%)
Mutual labels:  circuitpython
microS2
microS2 - An esp32-s2 based development board 🚀
Stars: ✭ 18 (-10%)
Mutual labels:  circuitpython
CircuitPython GC9A01 demos
Demos showing how to use CircuitPython displayio driver for GC9A01 round LCDs
Stars: ✭ 18 (-10%)
Mutual labels:  circuitpython
CapableRobot USBHub Driver
www.crowdsupply.com/capable-robot-components/programmable-usb-hub
Stars: ✭ 17 (-15%)
Mutual labels:  circuitpython
micropython-adafruit-mqtt-esp8266
Using MQTT to Publish/Subscribe to adafruit io. MicroPython/CircuitPython implementation on ESP8266/ESP32
Stars: ✭ 53 (+165%)
Mutual labels:  circuitpython

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 Travis CI support but will also work locally when a gcc compiler is present.

The pip package includes mpy-crosses that run on Travis. When building locally, the scripts will automatically clone the CircuitPython repo and attempt to build mpy-crosses. You'll need some version of gcc for this to work.

Setting up libraries

These build tools are intended for use with Travis CI to 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:

  1. Use the CircuitPython cookiecutter to generate .travis.yml.

  2. For adafruit repositories, simply give the CircuitPythonLibrarians team write access to the repo and Adabot will do the rest.

    Otherwise, go to travis-ci.org and find the repository (it needs to be setup to access your github account, and your github account needs access to write to the repo). Flip the 'ON' switch on for Travis and the repo, see the Travis docs for more details: https://docs.travis-ci.com/user/getting-started/

  3. Get a GitHub 'personal access token' which has at least 'public_repo' or 'repo' scope: https://help.github.com/articles/creating-an-access-token-for-command-line-use/ Keep this token safe and secure! Anyone with the token will be able to access and write to your GitHub repositories. Travis will use the token to attach the .mpy files to the release.

  4. In the Travis CI settings for the repository that was enabled find the environment variable editing page: https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings Add an environment variable named GITHUB_TOKEN and set it to the value of the GitHub personal access token above. Keep 'Display value in build log' flipped off.

  5. That's it! Tag a release and Travis should go to work to add zipped .mpy files to the release. It takes about a 2-3 minutes for a worker to spin up, build mpy-cross, and add the binaries to the release.

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>

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].