From f9074af79406d9b8fe7d462e7d1753f866a55374e574187510b99b6822e9c9c1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 6 Feb 2025 07:58:50 +0000 Subject: [PATCH] - Build mpremote tool OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=31 --- .gitattributes | 23 ++++ .gitignore | 1 + micropython-1.22.2.tar.xz | 3 + micropython-1.23.0.tar.xz | 3 + micropython-1.24.1.tar.xz | 3 + micropython.changes | 220 ++++++++++++++++++++++++++++++++++++++ micropython.spec | 107 ++++++++++++++++++ 7 files changed, 360 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 micropython-1.22.2.tar.xz create mode 100644 micropython-1.23.0.tar.xz create mode 100644 micropython-1.24.1.tar.xz create mode 100644 micropython.changes create mode 100644 micropython.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/micropython-1.22.2.tar.xz b/micropython-1.22.2.tar.xz new file mode 100644 index 0000000..7f7fe38 --- /dev/null +++ b/micropython-1.22.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb3ba34848a7620663b6a7cba22af45d3056fc79328c2ceb943874b5478d8756 +size 81440532 diff --git a/micropython-1.23.0.tar.xz b/micropython-1.23.0.tar.xz new file mode 100644 index 0000000..407aeab --- /dev/null +++ b/micropython-1.23.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ab283c2fc98d466c1ff26692bee46abaeeab55d488a36fc3cb6372cb8fb390d +size 85748224 diff --git a/micropython-1.24.1.tar.xz b/micropython-1.24.1.tar.xz new file mode 100644 index 0000000..27f4502 --- /dev/null +++ b/micropython-1.24.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d624a0b23389134d963b204601db9bc4ca57bfb615d13f13592bc2b5b494c03 +size 86842340 diff --git a/micropython.changes b/micropython.changes new file mode 100644 index 0000000..92757fa --- /dev/null +++ b/micropython.changes @@ -0,0 +1,220 @@ +------------------------------------------------------------------- +Wed Feb 5 23:17:33 UTC 2025 - Dominik Heidler + +- Build mpremote tool + +------------------------------------------------------------------- +Sat Nov 30 19:36:52 UTC 2024 - Jaime Marquínez Ferrándiz + +- Update to 1.24.1: + * https://github.com/micropython/micropython/releases/tag/v1.24.1 + +------------------------------------------------------------------- +Fri Nov 29 18:46:03 UTC 2024 - Jaime Marquínez Ferrándiz + +- Update to 1.24.0: + * https://github.com/micropython/micropython/releases/tag/v1.24.0 + +------------------------------------------------------------------- +Wed Sep 18 11:48:47 UTC 2024 - Yunus Acar + +- Update to 1.23.0: + * https://github.com/micropython/micropython/releases/tag/v1.23.0 + +------------------------------------------------------------------- +Tue May 21 09:06:25 UTC 2024 - Matej Cepl + +- Update to 1.22.2: + This is a patch release containing the following commits: + - py/compile: fix potential Py-stack overflow in try-finally + with return + - extmod/asyncio: support gather of tasks that finish early + - extmod/modssl_mbedtls: fix cipher iteration in + SSLContext.get_ciphers + - extmod/btstack: reset pending_value_handle before calling + write-done cb + - extmod/btstack: reset pending_value_handle before calling + read-done cb + - esp32/mpnimbleport: release the GIL while doing NimBLE port + deinit + - esp32: increase NimBLE task stack size and overflow detection + headroom + - mimxrt/modmachine: fix deepsleep wakeup pin ifdef + - renesas-ra/ra: fix SysTick clock source + - renesas-ra/boards/ARDUINO_PORTENTA_C33: fix the RTC clock + source + - renesas-ra/ra/ra_i2c: fix 1 byte and 2 bytes read issue + - rp2/rp2_dma: fix fetching 'write' buffers for writing not + reading + - rp2/machine_uart: fix event wait in uart.flush() and + uart.read() + - rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ + handlers +- Update to 1.22.1: + - This is a patch release to fix a race condition and potential + deadlock in the rp2 port's mp_thread_begin_atomic_section() + function, when the second core is in use. + +------------------------------------------------------------------- +Mon Jan 15 14:54:02 UTC 2024 - Andreas Schwab + +- Build with %optflags + +------------------------------------------------------------------- +Mon Jan 8 02:06:11 UTC 2024 - Steve Kowalik + +- Update to 1.22.0: + * https://github.com/micropython/micropython/releases/tag/v1.22.0 + * objslice: validate that the argument to indices() is an integer + (CVE-2023-7158, bsc#1218446) + +------------------------------------------------------------------- +Fri Apr 28 07:09:08 UTC 2023 - Steve Kowalik + +- Update to 1.20.0: + * https://github.com/micropython/micropython/releases/tag/v1.20.0 +- Remove 32572439984e5640c6af46fbe7c27400c30112ce.patch, included. +- Disable warning, since it is treated as an error. + +------------------------------------------------------------------- +Tue Mar 28 14:42:22 UTC 2023 - Dirk Müller + +- add 32572439984e5640c6af46fbe7c27400c30112ce.patch + +------------------------------------------------------------------- +Tue Oct 11 15:17:23 UTC 2022 - Andreas Schwab + +- Suppress stripping of binary +- Run tests everywhere with just the problematic ones suppressed + +------------------------------------------------------------------- +Sat Jul 2 06:18:04 UTC 2022 - Christophe Giboudeaux + +- Update to 1.19.1: + * https://github.com/micropython/micropython/releases/tag/v1.19 + +------------------------------------------------------------------- +Wed Feb 2 20:54:39 UTC 2022 - Jaime Marquínez Ferrándiz + +- Update to 1.18: full changelog available at + https://github.com/micropython/micropython/releases/tag/v1.18 + +------------------------------------------------------------------- +Sun Jan 16 13:34:06 UTC 2022 - Dirk Müller + +- avoid spec-cleaner messing it up + +------------------------------------------------------------------- +Fri Sep 24 23:42:55 UTC 2021 - Matej Cepl + +- Update to 1.17: + The release notes are REALLY long, so please go to + https://github.com/micropython/micropython/releases/tag/v1.17 + to read them. +- Remove already upstreamed patch fix-uasyncio_heaplock-test.patch. + +------------------------------------------------------------------- +Mon Aug 2 15:11:39 UTC 2021 - Danilo Spinella + +- Add fix-uasyncio_heaplock-test.patchto fix uasyncio_heaplock + test (originally from gh#micropython/micropython#7449) + +------------------------------------------------------------------- +Tue Jul 27 14:51:40 UTC 2021 - Matej Cepl + +- Remove unnecessary dependency on python2 + +------------------------------------------------------------------- +Fri Jul 23 13:42:44 UTC 2021 - Guillaume GARDET + +- Update to v1.16: + * Full release notes: https://github.com/micropython/micropython/releases/tag/v1.16 + * New command-line tool called "mpremote" + * Unix port updates: + - modffi: use a union for passing/returning FFI values + - main: increase stack limit on ARM architectures + - modffi: fix conversion between Python integers and ffi types + - fix build on arm64-darwin due to integer cast + +------------------------------------------------------------------- +Fri May 7 09:50:45 UTC 2021 - Mustafa Çalışkan + +- Update to version 1.15: + * Full release notes: https://github.com/micropython/micropython/releases/tag/v1.15 + * Unix port updates: + - mpbtstackport_common: implement mp_bluetooth_hci_active + - moduselect: don't allow both posix and non-posix configurations + - improve command line argument processing + - main: make static variable that's potentially clobbered by longjm +- Remove patch fix-aarch64-builds.patch +- Exclude ppc64 and ppc64le as build fails for those architectures + +------------------------------------------------------------------- +Sat Apr 17 03:06:16 UTC 2021 - Mustafa Çalışkan + +- Add patch fix-aarch64-builds.patch + +------------------------------------------------------------------- +Fri Feb 5 10:11:08 UTC 2021 - Guillaume GARDET + +- Update to v1.14: + * Full release notes: https://github.com/micropython/micropython/releases/tag/v1.14 + * Unix port updates: + - Makefile: always enable -f*-sections regardless of DEBUG setting + - implement BLE H4 HCI UART for btstack/nimble + - implement mp_hal_time_ns using gettimeofday + - variants: enable MICROPY_DEBUG_PARSE_RULE_NAME on coverage build + - mpconfigport.h: enable MICROPY_PY_DELATTR_SETATTR + - enable more warnings + - support building C++ code + - Makefile: move coverage.c and coveragecpp.cpp to coverage variant + - handle pending events/scheduler in MICROPY_EVENT_POLL_HOOK + - make mp_hal_delay_ms run MICROPY_EVENT_POLL_HOOK + - modtime: fix time() precision on unix ports with non-double floats + +------------------------------------------------------------------- +Fri Jan 29 10:59:00 UTC 2021 - Guillaume GARDET + +- Drop _service file +- Exclude %{arm} as lots of tests fail + +------------------------------------------------------------------- +Wed Jan 27 10:36:36 UTC 2021 - Guillaume GARDET + +- Cleanup package and enable tests + +------------------------------------------------------------------- +Sun Sep 6 13:30:02 UTC 2020 - Jaime Marquínez Ferrándiz + +- Update to 1.13: full changelog available at https://github.com/micropython/micropython/releases/tag/v1.13 + +------------------------------------------------------------------- +Thu Dec 26 15:28:38 UTC 2019 - Jaime Marquínez Ferrándiz + +- Update to 1.12: full changelog available at https://github.com/micropython/micropython/releases/tag/v1.12 +- Build mpy-cross + +------------------------------------------------------------------- +Sun Jun 23 12:41:06 UTC 2019 - Jaime Marquínez Ferrándiz + +- Update to 1.11: full changelog at https://github.com/micropython/micropython/releases/tag/v1.11 + +------------------------------------------------------------------- +Sat Jan 26 12:54:53 UTC 2019 - Jaime Marquínez Ferrándiz + +- Update to 1.10: full changelog at https://github.com/micropython/micropython/releases/tag/v1.10 + +------------------------------------------------------------------- +Thu Dec 6 10:16:28 UTC 2018 - Jaime Marquínez Ferrándiz + +- Use _service + +------------------------------------------------------------------- +Fri May 11 21:36:23 UTC 2018 - jaime.marquinez.ferrandiz@fastmail.net + +- Update to 1.9.4: full changelog at https://github.com/micropython/micropython/releases/tag/v1.9.4 + +------------------------------------------------------------------- +Fri Jan 12 16:03:26 UTC 2018 - jaime.marquinez.ferrandiz@fastmail.net + +- Update to 1.9.3: full changelog at https://github.com/micropython/micropython/releases/tag/v1.9.3 diff --git a/micropython.spec b/micropython.spec new file mode 100644 index 0000000..2dd080f --- /dev/null +++ b/micropython.spec @@ -0,0 +1,107 @@ +# +# spec file for package micropython +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define pythons python3 + +Name: micropython +Version: 1.24.1 +Release: 0 +Summary: Implementation of Python 3 with very low memory footprint +License: MIT +URL: https://micropython.org/ +Source: https://micropython.org/resources/source/%{name}-%{version}.tar.xz +BuildRequires: openssl +BuildRequires: pkgconfig +BuildRequires: python3 +BuildRequires: readline-devel +BuildRequires: pkgconfig(libffi) + +Recommends: micropython-lib +ExcludeArch: %{ix86} %{arm} ppc64 ppc64le + +%package -n mpremote +Summary: MicroPython remote control +BuildArch: noarch +BuildRequires: python3-hatch-requirements-txt +BuildRequires: python3-hatchling +Requires: python3-pyserial >= 3.3 +BuildRequires: %{python_module base >= 3.6} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros + +%description +A lean and efficient Python implementation for microcontrollers and constrained systems + +%description -n mpremote +This CLI tool provides an integrated set of utilities to remotely interact with +and automate a MicroPython device over a serial connection. + +%prep +%autosetup -p1 + +sed -i -e "s:/usr/lib/micropython:%{_prefix}/lib/micropython:g" "ports/unix/main.c" + +%define make_flags V=1 MICROPY_PY_BTREE=0 MICROPY_PY_USSL=0 + +%build +export CFLAGS="%optflags -Wno-dangling-pointer" +%make_build -C mpy-cross +%make_build -C ports/unix STRIP=true +pushd tools/mpremote +# inject version info as there is no git checkout to get tags from +echo "VERSION = '%{version}'" > version.py +sed -i -e 's/source = "vcs"/path = "version.py"/' pyproject.toml +# remove useless shebang lines +sed -i -e 's_#!/usr/bin/env python3__' mpremote/{__main__,transport,transport_serial}.py +%pyproject_wheel +popd + +%install +install -d %{buildroot}%{_bindir} +install -t %{buildroot}%{_bindir} ports/unix/build-standard/micropython +pushd tools/mpremote +%pyproject_install +%python3_fix_shebang +%fdupes %{buildroot}%{python3_sitelib} +popd + +%check +%ifnarch x86_64 +# 2 tests fail: float_parse float_parse_doubleprec +# https://github.com/micropython/micropython/pull/6024 +rm -f tests/float/float_parse.py +rm -f tests/float/float_parse_doubleprec.py +%endif +export MICROPY_CPYTHON3=python3 +make -C ports/unix PYTHON=%{_bindir}/python3 V=1 test + +%files +%license LICENSE +%doc docs/unix/* +%{_bindir}/micropython + +%files -n mpremote +%license tools/mpremote/LICENSE +%doc tools/mpremote/README.md +%{python3_sitelib}/mpremote +%{python3_sitelib}/mpremote-%{version}.dist-info +%{_bindir}/mpremote + +%changelog