From e9a93f23d912f7e08c3bb5dc8fe6848b1a21ba78 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 6 Jan 2017 11:27:28 -0800 Subject: [PATCH] Switch to CircuitPython and add badges to the README. --- .gitmodules | 10 +++++----- README.md | 16 ++++++++++------ README.txt | 2 +- build-bundle.py | 6 +++--- micropython => circuitpython | 0 libraries/helpers/register | 2 +- update_scripts/update_linux.sh | 2 +- update_scripts/update_macosx.command | 2 +- 8 files changed, 22 insertions(+), 18 deletions(-) rename micropython => circuitpython (100%) diff --git a/.gitmodules b/.gitmodules index ac4b3b52..d55805ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "micropython"] - path = micropython - url = https://github.com/adafruit/micropython +[submodule "circuitpython"] + path = circuitpython + url = https://github.com/adafruit/circuitpython [submodule "libraries/drivers/pca9685"] path = libraries/drivers/pca9685 url = git@github.com:adafruit/micropython-adafruit-pca9685.git @@ -30,10 +30,10 @@ url = git@github.com:adafruit/micropython-adafruit-tcs34725.git [submodule "libraries/register"] path = libraries/helpers/register - url = git@github.com:adafruit/Adafruit_MicroPython_Register.git + url = git@github.com:adafruit/Adafruit_CircuitPython_Register.git [submodule "libraries/bus_device"] path = libraries/helpers/bus_device - url = git@github.com:adafruit/Adafruit_MicroPython_BusDevice.git + url = git@github.com:adafruit/Adafruit_CircuitPython_BusDevice.git [submodule "libraries/drivers/neopixel"] path = libraries/drivers/neopixel url = git@github.com:adafruit/Adafruit_MicroPython_NeoPixel.git diff --git a/README.md b/README.md index e1ffab06..c136d8ce 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ -# Adafruit's MicroPython Bundle -This repo bundles a bunch of useful MicroPython libraries into an easy to -download zip file. MicroPython boards can ship with the contents of the zip to +# Adafruit CircuitPython Library Bundle + +[![Doc Status](https://readthedocs.org/projects/circuitpython/badge/?version=latest)](https://circuitpython.readthedocs.io/en/latest/docs/drivers.html) [![Gitter](https://badges.gitter.im/adafruit/circuitpython.svg)](https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) + +This repo bundles a bunch of useful CircuitPython libraries into an easy to +download zip file. CircuitPython boards can ship with the contents of the zip to make it easy to provide a lot of libraries by default. # Use To use the bundle download the zip (not source zip) from the latest release, -unzip it and copy over the subfolders into the root of your MicroPython device. +unzip it and copy over the subfolders, such as `lib`, into the root of your +CircuitPython device. # Development @@ -21,8 +25,8 @@ Determine the best location within `libraries` for the new library and then run: git submodule add libraries/ -The target directory should omit any micropython specific prefixes such as -`micropython-adafruit` to simplify the listing. +The target directory should omit any MicroPython or CircuitPython specific +prefixes such as `adafruit-micropython` to simplify the listing. ## Building the bundle To build the bundle run `build-bundle.py` it requires Python 3.5+ and will diff --git a/README.txt b/README.txt index bc7df378..8e9b8c8a 100644 --- a/README.txt +++ b/README.txt @@ -1,2 +1,2 @@ -See here for more info: https://github.com/adafruit/micropython-adafruit-bundle +See here for more info: https://github.com/adafruit/Adafruit_CircuitPython_Bundle See VERSIONS.txt for version info. diff --git a/build-bundle.py b/build-bundle.py index cb42dc5c..ffac1698 100755 --- a/build-bundle.py +++ b/build-bundle.py @@ -29,7 +29,7 @@ import sys import subprocess import zipfile -os.chdir("micropython/mpy-cross") +os.chdir("circuitpython/mpy-cross") make = subprocess.run(["make"]) os.chdir("../../") @@ -37,7 +37,7 @@ if make.returncode != 0: print("Unable to make mpy-cross.") sys.exit(1) -mpy_cross = "micropython/mpy-cross/mpy-cross" +mpy_cross = "circuitpython/mpy-cross/mpy-cross" if "build" in os.listdir("."): print("Deleting existing build.") @@ -125,7 +125,7 @@ with open("build/lib/VERSIONS.txt", "w") as f: else: f.write(repo.decode("utf-8", "strict") + "/releases/tag/" + line.strip().decode("utf-8", "strict") + "\r\n") -zip_filename = 'build/adafruit-micropython-bundle-' + version.decode("utf-8", "strict") + '.zip' +zip_filename = 'build/adafruit-circuitpython-bundle-' + version.decode("utf-8", "strict") + '.zip' def add_file(bundle, src_file, zip_name): global total_size diff --git a/micropython b/circuitpython similarity index 100% rename from micropython rename to circuitpython diff --git a/libraries/helpers/register b/libraries/helpers/register index f4cd3dd0..1e939bde 160000 --- a/libraries/helpers/register +++ b/libraries/helpers/register @@ -1 +1 @@ -Subproject commit f4cd3dd02108e33129e37de480611d6fb38a6d3f +Subproject commit 1e939bde9b0bb4bc595019db809296abd3438f9e diff --git a/update_scripts/update_linux.sh b/update_scripts/update_linux.sh index 80424451..7c70eeba 100755 --- a/update_scripts/update_linux.sh +++ b/update_scripts/update_linux.sh @@ -1,5 +1,5 @@ #! /bin/bash -latest_release=$(curl -s "https://api.github.com/repos/adafruit/micropython-adafruit-bundle/releases/latest") +latest_release=$(curl -s "https://api.github.com/repos/adafruit/Adafruit_CircuitPython_Bundle/releases/latest") download_link=$(echo $latest_release | grep -o "\"browser_download_url\": \"[^\"]*" | cut -d \" -f 4) tag=$(echo $latest_release | grep -o "\"tag_name\": \"[^\"]*" | cut -d \" -f 4) current=$(head -n 1 VERSIONS.txt | tr -d '[:space:]') diff --git a/update_scripts/update_macosx.command b/update_scripts/update_macosx.command index 80c58046..e2266999 100755 --- a/update_scripts/update_macosx.command +++ b/update_scripts/update_macosx.command @@ -1,6 +1,6 @@ #! /bin/bash cd $(dirname $0) -latest_release=$(curl -s "https://api.github.com/repos/adafruit/micropython-adafruit-bundle/releases/latest") +latest_release=$(curl -s "https://api.github.com/repos/adafruit/Adafruit_CircuitPython_Bundle/releases/latest") download_link=$(echo $latest_release | grep -o "\"browser_download_url\": \"[^\"]*" | cut -d \" -f 4) tag=$(echo $latest_release | grep -o "\"tag_name\": \"[^\"]*" | cut -d \" -f 4) current=$(head -n 1 VERSIONS.txt | tr -d '[:space:]')