diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 62 |
1 files changed, 28 insertions, 34 deletions
@@ -1,45 +1,26 @@ -# Maintainer: Kyle Keen <keenerd@gmail.com> +# Maintainer: Aman Gupta <aman.iv0012@gmail.com> + pkgbase=micropython pkgname=(micropython micropython-lib) -pkgver=1.10 -_libver=1.9.3 -# stupid submodules -_axver=1.8.2 -_ffiver=3.2.1 +pkgver=1.22.0 +_libver=1.22.0 pkgrel=1 -pkgdesc="Python3 for microcontrollers, with stdlib. (unix version)" +pkgdesc="Python3 for microcontrollers, with stdlib. (UNIX version)" arch=('i686' 'x86_64') url="http://micropython.org/" license=('MIT') depends=('readline' 'libffi' 'mbedtls') makedepends=('python' 'python-setuptools' 'git') options=('!emptydirs') -source=("mpy-$pkgver.tgz::https://github.com/micropython/micropython/archive/v$pkgver.tar.gz" - "mlib-$_libver.tgz::https://github.com/micropython/micropython-lib/archive/v$_libver.tar.gz" - "axtls-$_axver.tgz::https://github.com/pfalcon/axtls/archive/v$_axver.tar.gz" # completely broken - "ffi-$_ffiver.tgz::https://github.com/libffi/libffi/archive/v$_ffiver.tar.gz" - "bdb.tgz::https://github.com/pfalcon/berkeley-db-1.xx/archive/embedded.tar.gz") # submodule with no releases! -# What about the lwip submodule? The repo is GONE. You didn't need an IP stack anyway. -# Maybe http://download.savannah.gnu.org/releases/lwip/lwip-2.0.0.zip is it? -md5sums=('335d51f6f66a8f6dac95f4a53d0af579' - '1752ce13e851a671a07ce3f7a807b21c' - 'e11da4ef04499030d1eff69b474f34f0' - '9066486bcab807f7ddaaf2596348c1db' - 'SKIP') +# They finally have a real release, without all the submodule garbage. +source=("https://micropython.org/resources/source/micropython-$pkgver.tar.xz" + "mlib-$_libver.tgz::https://github.com/micropython/micropython-lib/archive/v$_libver.tar.gz") +md5sums=('662c576a34f723c6e939a0f15a18b659' + 'e0ef75b2e0e5a72bbab88c70e8778d72') # todo: # fix 'imported as namespace package' warnings from stdlib - prepare() { - cd "$srcdir/micropython-$pkgver/lib" - # fix submodules - rmdir axtls - rmdir libffi - rmdir berkeley-db-1.xx - ln -s "$srcdir/axtls-$_axver" axtls - ln -s "$srcdir/libffi-$_ffiver" libffi - ln -s "$srcdir/berkeley-db-1.xx-embedded" berkeley-db-1.xx - # fix makefile cd "$srcdir/micropython-$pkgver/ports/unix" sed -i 's|/local||' Makefile @@ -49,20 +30,28 @@ prepare() { sed -i 's/MICROPY_PY_USSL = 1/MICROPY_PY_USSL = 0/' mpconfigport.mk sed -i 's/MICROPY_SSL_AXTLS = 1/MICROPY_SSL_AXTLS = 0/' mpconfigport.mk sed -i 's/MICROPY_SSL_MBEDTLS = 0/MICROPY_SSL_MBEDTLS = 1/' mpconfigport.mk + + # disabling ffi may be needed, if you get weird linking errors + sed -i 's/MICROPY_PY_FFI = 1/MICROPY_PY_FFI = 0/' mpconfigport.mk } build() { - cd "$srcdir/micropython-$pkgver/ports/unix" - #make libffi - #make V=1 deplibs + export CFLAGS_EXTRA="-Wno-dangling-pointer" + cd "$srcdir/micropython-$pkgver/mpy-cross" make - cd "$srcdir/micropython-lib-$_libver" + cd "$srcdir/micropython-$pkgver/ports/unix" + # make libffi + make V=1 deplibs + # make submodules make + # cd "$srcdir/micropython-lib-$_libver" + # make } check() { cd "$srcdir/micropython-$pkgver/ports/unix" - #make test + # some tests appear non-deterministic + # make test } package_micropython() { @@ -86,6 +75,11 @@ package_micropython-lib() { error "Skipping $_d (no setup)" continue fi + # todo: fixing this probably involves overriding PYTHONPATH + if [[ "$_d" == "./types" ]]; then + error "Skipping $_d (unresolved name collision)" + continue + fi msg "Installing $_d" cd $_d python3 setup.py install --prefix=/usr --root="$pkgdir" --install-lib='/usr/lib/micropython' |