Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] new aport: testing/micropython

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Thu, 3 Aug 2017 13:52:04 +0200

On Wed, 2 Aug 2017 09:24:03 +0200
Marian Buschsieweke <marian.buschsieweke_at_ovgu.de> wrote:

> A lean and efficient Python implementation for MCUs and constrained systems
> http://www.micropython.org/
> ---
> testing/micropython/0000-unix-mpconfigport.patch | 22 ++++++++++++
> testing/micropython/APKBUILD | 44 ++++++++++++++++++++++++
> 2 files changed, 66 insertions(+)
> create mode 100644 testing/micropython/0000-unix-mpconfigport.patch
> create mode 100644 testing/micropython/APKBUILD

Thanks you for this. Please see comments below:


> +
> +prepare() {
> + cd "${srcdir}"
> + for i in $source; do
> + case $i in
> + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
> + esac
> + done
> +}

You don't need the prepare() function. Recent abuild will do that
automatically for you.

> +
> +build() {
> + cd "$builddir"
> + unset CFLAGS

Why is unsetting CFLAGS needed?

> + make
> +}
> +
> +check() {
> + cd "$builddir"
> + make test
> +}
> +
> +package() {
> + cd "$builddir"
> + mkdir -p "${pkgdir}/usr/bin"
> + install -m755 micropython "${pkgdir}/usr/bin/micropython"
> +}
> +

build fails due to missing pyhon:

Generating build/frozen.c
env: can't execute 'python': No such file or directory

When I add python2 to makedepends it fails during tests:

...
skip unix/extra_coverage.py
FAIL unix/ffi_callback.py
pass unix/ffi_float.py
pass unix/ffi_float2.py
597 tests performed (18223 individual testcases)
596 tests passed
40 tests skipped: builtin_help class_delattr_setattr cmd_parsetree btree1 framebuf1 framebuf16 framebuf4 uhashlib_sha1 urandom_extra ussl_basic vfs_basic vfs_fa
t_fileio1 vfs_fat_fileio2 vfs_fat_more vfs_fat_oldproto vfs_fat_ramdisk buffered_writer native_closure native_const_intbig native_misc schedule viper_addr viper
_args viper_binop_arith viper_binop_comp viper_binop_comp_imm viper_binop_multi_comp viper_cond viper_error viper_import viper_misc viper_misc_intbig viper_ptr1
6_load viper_ptr16_store viper_ptr32_load viper_ptr32_store viper_ptr8_load viper_ptr8_store viper_subscr extra_coverage
1 tests failed: ffi_callback
make: *** [Makefile:192: test] Error 1



> +sha512sums="bc0eeb1e6d821034b7157613f2d421df304f2959e9fd62d2886641eba8d74575787861c9ff46fc3bcb9c14c6ad1f698043231801207f946af9b5d302bb253c63 micropython-1.9.1.tar.gz
> +926515a76dc856192de79a7c35c390bd533a38a2c163812ce5a3739280ca33881791f3d199922edb2e577ec9ac16265dc4891ad96f6c6eb4e7cf9d5ae8044a32 0000-unix-mpconfigport.patch"



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Aug 03 2017 - 13:52:04 GMT