mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 05:31:25 +02:00
64 lines
2.2 KiB
Plaintext
64 lines
2.2 KiB
Plaintext
# Contributor: Marian <marian.buschsieweke@ovgu.de>
|
|
# Maintainer: Marian <marian.buschsieweke@ovgu.de>
|
|
pkgname=micropython
|
|
pkgver=1.17
|
|
pkgrel=0
|
|
pkgdesc="lean and efficient Python implementation for MCUs and constrained systems"
|
|
url="https://www.micropython.org/"
|
|
|
|
# ppc64le: mpy-cross fails to compile with "unsupported relocation type 4"
|
|
# armv7: 17 unit tests fail, mostly viper related
|
|
# armhf: fails to build
|
|
# s390x: sporadic test failures: "2 tests failed: repl_cont uasyncio_heaplock"
|
|
arch="all !ppc64le !armv7 !armhf !s390x"
|
|
|
|
license="MIT"
|
|
makedepends="libffi-dev python3"
|
|
subpackages="$pkgname-cross"
|
|
source="micropython-$pkgver.tar.gz::https://github.com/micropython/micropython/archive/v$pkgver.tar.gz
|
|
micropython-1.9.4-prevent-stripping.patch
|
|
no_ussl.patch
|
|
no_legacy_berkeley_db.patch
|
|
"
|
|
|
|
build() {
|
|
make -C mpy-cross PYTHON=python3
|
|
make -C ports/unix PYTHON=python3
|
|
}
|
|
|
|
check() {
|
|
# float rounding fails https://github.com/micropython/micropython/issues/4176
|
|
case "$CARCH" in
|
|
s390x)
|
|
rm tests/float/float_parse.py tests/float/float_parse_doubleprec.py
|
|
;;
|
|
aarch64)
|
|
rm tests/float/float_parse.py tests/float/float_parse_doubleprec.py
|
|
;;
|
|
esac
|
|
|
|
# ffi callback fails on kernel with PaX
|
|
rm tests/unix/ffi_callback.py
|
|
|
|
make -C ports/unix test PYTHON=python3
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir/usr/bin"
|
|
install -m755 ports/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="
|
|
6995ec2bfdf5193fe8259db95341ca0d4556f1adbb203678633a447ad74a4adf98cdf798d380f84e619abd72d420b2397b0a78abe5b6413ce3493cd86af0f3b8 micropython-1.17.tar.gz
|
|
eff33f41757048113d013cb30566c5d1eed72fdbd3cd7b046655efb168f39165e3bb17fa3c29a8f27039393db9363a8a12b9d75faa21fc6c370b16500a54ef52 micropython-1.9.4-prevent-stripping.patch
|
|
9a6cd131c8875a9d320653b7b93d46a759eee3255e25763eb8de6934b3035f691e497eafc9412320f13c5921a384d42d6e60ea3eb3d65f3a6101dae9be514f3c no_ussl.patch
|
|
e86ad02ef746605f2f685ae776a6ad6ea39ae6e57fa0869a0c03895fd581647de20fa7e6aaeebac45e7302a63451d625208b1356ee2f35a66df70ac2755a25ff no_legacy_berkeley_db.patch
|
|
"
|