27 Commits

Author SHA256 Message Date
040d2aca98 Accepting request 1299777 from devel:languages:python
- Version 1.26.0
  * Added machine.I2CTarget for creating I2C target devices on multiple ports.
  * New MCU support: STM32N6xx (800 MHz, ML accel) & ESP32-C2 (WiFi + BLE).
  * Major float accuracy boost (~28% → ~98%), constant folding in compiler.
  * Optimized native/Viper emitters; reduced heap use for slices.
  * Time functions standardized (1970–2099); new boards across ESP32, SAMD, STM32, Zephyr.
  * ESP32: ESP-IDF 5.4.2, flash auto-detect, PCNT class, LAN8670 PHY.
  * RP2: compressed errors, better lightsleep, hard IRQ timers.
  * Zephyr v4.0.0: PWM, SoftI2C/SPI, BLE runtime services, boot.py/main.py support.
  * mpremote adds fs tree, improved df, portable config paths.
  * Updated lwIP, LittleFS, libhydrogen, stm32lib; expanded hardware/CI tests.
- Removed micropython-gcc15-string-initialization.patch as included upstream

OBS-URL: https://build.opensuse.org/request/show/1299777
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=22
2025-08-15 19:52:37 +00:00
c9e59fe971 - Removed micropython-gcc15-string-initialization.patch as included upstream
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=54
2025-08-15 09:15:21 +00:00
8f53efdcfb - Version 1.26.0
* Added machine.I2CTarget for creating I2C target devices on multiple ports.
  * New MCU support: STM32N6xx (800 MHz, ML accel) & ESP32-C2 (WiFi + BLE).
  * Major float accuracy boost (~28% → ~98%), constant folding in compiler.
  * Optimized native/Viper emitters; reduced heap use for slices.
  * Time functions standardized (1970–2099); new boards across ESP32, SAMD, STM32, Zephyr.
  * ESP32: ESP-IDF 5.4.2, flash auto-detect, PCNT class, LAN8670 PHY.
  * RP2: compressed errors, better lightsleep, hard IRQ timers.
  * Zephyr v4.0.0: PWM, SoftI2C/SPI, BLE runtime services, boot.py/main.py support.
  * mpremote adds fs tree, improved df, portable config paths.
  * Updated lwIP, LittleFS, libhydrogen, stm32lib; expanded hardware/CI tests.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=53
2025-08-15 08:25:38 +00:00
67eb298778 Accepting request 1291954 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1291954
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=21
2025-07-11 19:30:41 +00:00
479ad3f4b3 Accepting request 1291781 from home:badshah400:GCC15
Add micropython-gcc15-string-initialization.patch: Refactor string literal as array initializer (gh#micropython/micropython#17269).

OBS-URL: https://build.opensuse.org/request/show/1291781
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=51
2025-07-11 11:04:06 +00:00
494d61ca63 Accepting request 1282363 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1282363
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=20
2025-06-03 17:10:48 +00:00
bcb6d6a664 Delete even more libs
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=47
2025-05-27 13:16:18 +00:00
4cb58cf646 Tinyusb is not needed on linux
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=46
2025-05-26 13:11:17 +00:00
e9f68f91df Don't include all ports
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=45
2025-05-26 12:56:32 +00:00
a143fb3542 Drop more unneeded libs
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=44
2025-05-26 12:34:40 +00:00
6993c0f7f6 Mention prepare.sh in spec file
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=43
2025-05-26 12:22:43 +00:00
af622f8333 - Add script to delete some 3rd party libraries from the src tar
that are not needed to build the unix port in order to
  make the legal review easier

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=42
2025-05-26 11:55:32 +00:00
f48c9863a9 Accepting request 1270586 from devel:languages:python
- Update to 1.25.0
  * Add ROMFS support (see also "mpremote romfs" cmd with "query", "build", and "deploy" sub-commands)
    ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources,
	including precompiled mpy files, and allows executing bytecode directly from the filesystem.
	This makes importing significantly faster and use a lot less memory.
  * Inline assembler now supports 32-bit RISC-V assembly code via the newly implemented @micropython.asm_rv32 decorator.
  * Datagram TLS (DTLS) is now supported by the tls module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports.
  * mpremote command-line tool now supports recursive remove via the new "rm -r"
  * mpremote now supports relative URLs in the package.json for installing from the local filesystem
  * "mpremote mount" has optimised readline support
  * full support for tuples and start/end arguments in str.startswith() and str.endswith() methods
  * vfs.mount() with no arguments now returns a list of mounted filesystems
  * marshal module has been added with dumps() and loads() functions
  * MicroPython native linker mpy_ld.py now includes support for linking in static libraries automatically
  * native modules now support 32-bit RISC-V code
  * force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI
  * enable VfsRom on standard and coverage variants
  * use the bare metal mbedTLS config in the coverage buiid
  * add recursive mutex support
  * main: add coverage test for mounting ROMFS filesystem at startup
- Drop fix_re_sub_test_on_python3.13.patch as not needed anymore

OBS-URL: https://build.opensuse.org/request/show/1270586
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=19
2025-04-18 14:20:54 +00:00
64d6dbbb6a - Update to 1.25.0
* Add ROMFS support (see also "mpremote romfs" cmd with "query", "build", and "deploy" sub-commands)
    ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources,
	including precompiled mpy files, and allows executing bytecode directly from the filesystem.
	This makes importing significantly faster and use a lot less memory.
  * Inline assembler now supports 32-bit RISC-V assembly code via the newly implemented @micropython.asm_rv32 decorator.
  * Datagram TLS (DTLS) is now supported by the tls module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports.
  * mpremote command-line tool now supports recursive remove via the new "rm -r"
  * mpremote now supports relative URLs in the package.json for installing from the local filesystem
  * "mpremote mount" has optimised readline support
  * full support for tuples and start/end arguments in str.startswith() and str.endswith() methods
  * vfs.mount() with no arguments now returns a list of mounted filesystems
  * marshal module has been added with dumps() and loads() functions
  * MicroPython native linker mpy_ld.py now includes support for linking in static libraries automatically
  * native modules now support 32-bit RISC-V code
  * force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI
  * enable VfsRom on standard and coverage variants
  * use the bare metal mbedTLS config in the coverage buiid
  * add recursive mutex support
  * main: add coverage test for mounting ROMFS filesystem at startup
- Drop fix_re_sub_test_on_python3.13.patch as not needed anymore

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=40
2025-04-16 12:11:06 +00:00
c9a3a55fa5 Accepting request 1255628 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1255628
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=18
2025-03-25 21:10:23 +00:00
7f27bebe07 - Add fix_re_sub_test_on_python3.13.patch to fix re_sub test
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=38
2025-03-17 12:53:37 +00:00
adade8a593 Accepting request 1246653 from devel:languages:python
- Add subpackage mpy-tools which contains mpy-cross and mpy-tool

OBS-URL: https://build.opensuse.org/request/show/1246653
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=17
2025-02-18 18:12:50 +00:00
d735501d4a - Add subpackage mpy-tools which contains mpy-cross and mpy-tool
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=36
2025-02-18 11:49:19 +00:00
6df9150b08 Accepting request 1244833 from devel:languages:python
Build mpremote

OBS-URL: https://build.opensuse.org/request/show/1244833
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=16
2025-02-11 20:22:45 +00:00
9955417dbe Fix 15.6 fixes
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=34
2025-02-10 17:38:34 +00:00
b3240a1079 Accepting request 1244139 from home:dheidler:branches:devel:languages:python
- Fix build for 15.6

Depends on https://build.opensuse.org/requests/1244131

OBS-URL: https://build.opensuse.org/request/show/1244139
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=33
2025-02-07 19:04:09 +00:00
1b94672148 Accepting request 1243566 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1243566
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=15
2025-02-06 21:08:30 +00:00
fe4b3a5d6d Accepting request 1243518 from home:dheidler
- Build mpremote tool

OBS-URL: https://build.opensuse.org/request/show/1243518
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=31
2025-02-06 07:58:50 +00:00
9cdda4c07a Accepting request 1227683 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1227683
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=14
2024-12-02 15:59:19 +00:00
368e053cd0 Accepting request 1227541 from home:jaimeMF:branches:devel:languages:python
- Update to 1.24.1:
  * https://github.com/micropython/micropython/releases/tag/v1.24.1
- Update to 1.24.0:
  * https://github.com/micropython/micropython/releases/tag/v1.24.0

OBS-URL: https://build.opensuse.org/request/show/1227541
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=29
2024-12-02 08:46:28 +00:00
677e47e685 Accepting request 1201783 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1201783
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/micropython?expand=0&rev=13
2024-09-19 19:16:54 +00:00
01a6cb8fe1 Accepting request 1201778 from home:yacar:branches:devel:languages:python
- Update to 1.23.0:
  * https://github.com/micropython/micropython/releases/tag/v1.23.0

OBS-URL: https://build.opensuse.org/request/show/1201778
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/micropython?expand=0&rev=27
2024-09-18 12:08:46 +00:00
5 changed files with 203 additions and 8 deletions

BIN
micropython-1.22.2.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c43e4512fb2ada940a1d7808c84f313a161339b39c921292706b2f0163818062
size 16178748

View File

@@ -1,3 +1,96 @@
-------------------------------------------------------------------
Fri Aug 15 08:13:39 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Version 1.26.0
* Added machine.I2CTarget for creating I2C target devices on multiple ports.
* New MCU support: STM32N6xx (800 MHz, ML accel) & ESP32-C2 (WiFi + BLE).
* Major float accuracy boost (~28% → ~98%), constant folding in compiler.
* Optimized native/Viper emitters; reduced heap use for slices.
* Time functions standardized (19702099); new boards across ESP32, SAMD, STM32, Zephyr.
* ESP32: ESP-IDF 5.4.2, flash auto-detect, PCNT class, LAN8670 PHY.
* RP2: compressed errors, better lightsleep, hard IRQ timers.
* Zephyr v4.0.0: PWM, SoftI2C/SPI, BLE runtime services, boot.py/main.py support.
* mpremote adds fs tree, improved df, portable config paths.
* Updated lwIP, LittleFS, libhydrogen, stm32lib; expanded hardware/CI tests.
- Removed micropython-gcc15-string-initialization.patch as included upstream
-------------------------------------------------------------------
Thu Jul 10 20:22:14 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Add micropython-gcc15-string-initialization.patch: Refactor
string literal as array initializer
(gh#micropython/micropython#17269).
-------------------------------------------------------------------
Mon May 26 11:53:07 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Add script to delete some 3rd party libraries from the src tar
that are not needed to build the unix port in order to
make the legal review easier
-------------------------------------------------------------------
Wed Apr 16 11:59:42 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Update to 1.25.0
* Add ROMFS support (see also "mpremote romfs" cmd with "query", "build", and "deploy" sub-commands)
ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources,
including precompiled mpy files, and allows executing bytecode directly from the filesystem.
This makes importing significantly faster and use a lot less memory.
* Inline assembler now supports 32-bit RISC-V assembly code via the newly implemented @micropython.asm_rv32 decorator.
* Datagram TLS (DTLS) is now supported by the tls module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports.
* mpremote command-line tool now supports recursive remove via the new "rm -r"
* mpremote now supports relative URLs in the package.json for installing from the local filesystem
* "mpremote mount" has optimised readline support
* full support for tuples and start/end arguments in str.startswith() and str.endswith() methods
* vfs.mount() with no arguments now returns a list of mounted filesystems
* marshal module has been added with dumps() and loads() functions
* MicroPython native linker mpy_ld.py now includes support for linking in static libraries automatically
* native modules now support 32-bit RISC-V code
* force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI
* enable VfsRom on standard and coverage variants
* use the bare metal mbedTLS config in the coverage buiid
* add recursive mutex support
* main: add coverage test for mounting ROMFS filesystem at startup
- Drop fix_re_sub_test_on_python3.13.patch as not needed anymore
-------------------------------------------------------------------
Mon Mar 17 12:24:36 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Add fix_re_sub_test_on_python3.13.patch to fix re_sub test
-------------------------------------------------------------------
Tue Feb 18 11:48:17 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Add subpackage mpy-tools which contains mpy-cross and mpy-tool
-------------------------------------------------------------------
Fri Feb 7 10:33:24 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Fix build for 15.6
-------------------------------------------------------------------
Wed Feb 5 23:17:33 UTC 2025 - Dominik Heidler <dheidler@suse.de>
- Build mpremote tool
-------------------------------------------------------------------
Sat Nov 30 19:36:52 UTC 2024 - Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
- 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 <jaime.marquinez.ferrandiz@fastmail.net>
- 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 <yunus.acar@suse.com>
- 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 <mcepl@cepl.eu>

View File

@@ -1,7 +1,7 @@
#
# spec file for package micropython
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,24 +16,54 @@
#
%define pythons python3
%{?sle15_python_module_pythons}
Name: micropython
Version: 1.22.2
Version: 1.26.0
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
Source0: %{name}-%{version}.tar.xz
Source1: prepare.sh
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: %{python_module hatch-requirements-txt}
BuildRequires: %{python_module 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
%package -n mpy-tools
Summary: Tools for creating and handling precompiled .mpy files for MicroPython
Provides: mpy-cross
Provides: mpy-tool
%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.
%description -n mpy-tools
MicroPython tools like the mpy-cross compiler for compiling.py files to .mpy files.
Also mpy-tool for inspecting .mpy files.
%prep
%autosetup -p1
@@ -42,14 +72,37 @@ sed -i -e "s:/usr/lib/micropython:%{_prefix}/lib/micropython:g" "ports/unix/main
%define make_flags V=1 MICROPY_PY_BTREE=0 MICROPY_PY_USSL=0
%build
# micropython
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
# micropython
install -d %{buildroot}%{_bindir}
install -t %{buildroot}%{_bindir} ports/unix/build-standard/micropython
# mpremote
pushd tools/mpremote
%pyproject_install
popd
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# remove pycache to get rid of rpmlint "W: python-bytecode-inconsistent-mtime" warnings
%python_expand rm -rf %{buildroot}%{$python_sitelib}/mpremote/__pycache__
# mpy-tools
install -m755 -D -v mpy-cross/build/mpy-cross %{buildroot}%{_bindir}/mpy-cross
install -m755 -D -v tools/mpy-tool.py %{buildroot}%{_bindir}/mpy-tool
%python3_fix_shebang
%check
%ifnarch x86_64
# 2 tests fail: float_parse float_parse_doubleprec
@@ -57,12 +110,25 @@ install -t %{buildroot}%{_bindir} ports/unix/build-standard/micropython
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
export MICROPY_CPYTHON3=python%python_version
make -C ports/unix PYTHON=%{_bindir}/python%python_version V=1 test
%files
%license LICENSE
%doc docs/unix/*
%{_bindir}/micropython
%files -n mpremote
%license tools/mpremote/LICENSE
%doc tools/mpremote/README.md
%{_prefix}/lib/python%{python_version}/site-packages/mpremote
%{_prefix}/lib/python%{python_version}/site-packages/mpremote-%{version}.dist-info
%{_bindir}/mpremote
%files -n mpy-tools
%doc mpy-cross/README.md
%license LICENSE
%{_bindir}/mpy-cross
%{_bindir}/mpy-tool
%changelog

36
prepare.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# this removes some 3rd party libraries from the src tar that are not needed to build the unix port
# in order to make the legal review easier
set -e
version=$(rpmspec --query micropython.spec | head -1 | cut -d- -f2)
rm -fv micropython-*.tar.xz
wget "https://micropython.org/resources/source/micropython-${version}.tar.xz" -O "micropython-${version}.tar.xz"
tar xf "micropython-${version}.tar.xz"
pushd "micropython-${version}"
rm -rv "lib/fsp"
rm -rv "lib/alif-security-toolkit"
rm -rv "lib/alif_ensemble-cmsis-dfp"
rm -rv "lib/asf4"
rm -rv "lib/cyw43-driver"
rm -rv "lib/axtls"
rm -rv "lib/tinyusb"
rm -rv "lib/stm32lib"
rm -rv "lib/btstack"
rm -rv "lib/pico-sdk"
rm -rv "lib/nrfx"
rm -rv "lib/lwip"
rm -rv "lib/libffi"
rm -rv "lib/protobuf-c"
rm -rv "lib/nxp_driver"
rm -rv "lib/arduino-lib"
rm -rv "lib/mynewt-nimble"
pushd "ports"
find . -maxdepth 1 -type d | grep -v unix | grep -v esp | grep -v rp2 | grep -v minimal | grep -v qemu | grep -v webassembly | xargs rm -rv || :
popd
popd
tar caf "micropython-${version}.tar.xz" "micropython-${version}"
rm -r "micropython-${version}"