aboutsummaryrefslogtreecommitdiffstats
path: root/testing/micropython/APKBUILD
blob: 65ca7ea82b632b96536051285d51f62597c2d7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Contributor: Marian <marian.buschsieweke@ovgu.de>
# Maintainer: Marian <marian.buschsieweke@ovgu.de>
pkgname=micropython
pkgver=1.9.1
pkgrel=1
pkgdesc="A lean and efficient Python implementation for MCUs and constrained systems"
url="http://www.micropython.org/"

# ../py/persistentcode.c:397:2: error: #error mp_raw_code_save_file not implemented for this platform
arch="x86 x86_64 armhf"

license="MIT"
depends=""
makedepends="libffi-dev python3"
subpackages=""
source="${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz
        0000-unix-mpconfigport.patch
	python3.patch
	"
builddir="${srcdir}/${pkgname}-${pkgver}"

build() {
	cd "$builddir"
	make -C unix PYTHON=python3
}

check() {
	cd "$builddir"

	# ffi callback fails on kernel with PaX
	rm tests/unix/ffi_callback.py

	make -C unix test PYTHON=python3
}

package() {
	cd "$builddir"
	mkdir -p "${pkgdir}/usr/bin"
	install -m755 unix/micropython "${pkgdir}/usr/bin/micropython"
}

sha512sums="bc0eeb1e6d821034b7157613f2d421df304f2959e9fd62d2886641eba8d74575787861c9ff46fc3bcb9c14c6ad1f698043231801207f946af9b5d302bb253c63  micropython-1.9.1.tar.gz
a9f922627db7cb59f56798f850c024382adffa1d1b5ccc27597ae34a9be53983a573e6dab64db4376ab24733624ad2005e67d96265517fb303d5b56f1b2654ea  0000-unix-mpconfigport.patch
66ca172a6e9f4866e733e6c9303882dbb5f5729ffc685e0ba200010bacb8d5014527efd82da4c2ab62266e0816917758ae8e6089fb575ec31c3dc4441909343f  python3.patch"