1

[alpine-aports] [PATCH] testing/micropython: Added subpackage micropython-cross

Marian Buschsieweke
Details
Message ID
<20170803140843.31350-1-marian.buschsieweke@ovgu.de>
Sender timestamp
1501769323
DKIM signature
missing
Download raw message
Patch: +9 -2
micropython-cross provides mpy-cross, which allows compiling python
code to micropython bytecode. This is particularly useful to
unburden MCUs from the task to compile python scripts.
---
 testing/micropython/APKBUILD | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/testing/micropython/APKBUILD b/testing/micropython/APKBUILD
index cd003b4e4a..1306af73b7 100644
--- a/testing/micropython/APKBUILD
+++ b/testing/micropython/APKBUILD
@@ -2,14 +2,14 @@
 # Maintainer: Marian <marian.buschsieweke@ovgu.de>
 pkgname=micropython
 pkgver=1.9.1
-pkgrel=0
+pkgrel=1
 pkgdesc="A lean and efficient Python implementation for MCUs and constrained systems"
 url="http://www.micropython.org/"
 arch="all"
 license="MIT"
 depends=""
 makedepends="libffi-dev python3 python2"
-subpackages=""
+subpackages="$pkgname-cross"
 source="${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz
         0000-unix-mpconfigport.patch
 	python3.patch
@@ -37,6 +37,13 @@ package() {
 	install -m755 unix/micropython "${pkgdir}/usr/bin/micropython"
 }
 
+cross() {
+	pkgdesc="Compile micropython code to bytecode, which can be transfered to MCUs"
+	cd "$builddir"
+	mkdir -p "${subpkgdir}/usr/bin"
+	install -m755 mpy-cross/mpy-cross "${subpkgdir}/usr/bin/mpy-cross"
+}
+
 sha512sums="bc0eeb1e6d821034b7157613f2d421df304f2959e9fd62d2886641eba8d74575787861c9ff46fc3bcb9c14c6ad1f698043231801207f946af9b5d302bb253c63  micropython-1.9.1.tar.gz
 a9f922627db7cb59f56798f850c024382adffa1d1b5ccc27597ae34a9be53983a573e6dab64db4376ab24733624ad2005e67d96265517fb303d5b56f1b2654ea  0000-unix-mpconfigport.patch
 66ca172a6e9f4866e733e6c9303882dbb5f5729ffc685e0ba200010bacb8d5014527efd82da4c2ab62266e0816917758ae8e6089fb575ec31c3dc4441909343f  python3.patch"
-- 
2.13.3



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20170803163920.705fcf75@ncopa-desktop.copa.dup.pw>
In-Reply-To
<20170803140843.31350-1-marian.buschsieweke@ovgu.de> (view parent)
Sender timestamp
1501771160
DKIM signature
missing
Download raw message
On Thu,  3 Aug 2017 16:08:43 +0200
Marian Buschsieweke <marian.buschsieweke@ovgu.de> wrote:

> micropython-cross provides mpy-cross, which allows compiling python
> code to micropython bytecode. This is particularly useful to
> unburden MCUs from the task to compile python scripts.

I rebased it against current master and pushed.

Thanks!

-nc


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---