Files
packages/lang/python/python-orjson/Makefile
Alexandru Ardelean cf5b39f8c3 python-orjson: update to 3.11.8, add test.sh
Update to 3.11.8 to fix the build error with Python 3.14

```
  --- stderr
  error: the configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)
  = help: please check if an updated version of PyO3 is available. Current version: 0.23.0-dev
  = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
```

orjson imports uuid.py at module init to look up uuid.UUID type;
python3-uuid is a separate package not included in python3-light,
causing a segfault when python3-uuid is absent. Add it as an explicit
dependency to fix the crash on all architectures.

Crash is:
```
importing orjson...
Fatal Python error: Segmentation fault

Current thread 0xecf37c64 [python3] (most recent call first):
  File "<frozen importlib._bootstrap>", line 491 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1061 in exec_module
  File "<frozen importlib._bootstrap>", line 938 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1342 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1371 in _find_and_load
  File "/usr/lib/python3.14/site-packages/orjson/__init__.py", line 8 in <module>
  File "<frozen importlib._bootstrap>", line 491 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 759 in exec_module
  File "<frozen importlib._bootstrap>", line 938 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1342 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1371 in _find_and_load
  File "<stdin>", line 5 in <module>

Current thread's C stack trace (most recent call first):
  <cannot get C stack on this system>
Segmentation fault (core dumped)
Test failed
```

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-09 07:58:46 +03:00

40 lines
970 B
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=python-orjson
PKG_VERSION:=3.11.8
PKG_RELEASE:=1
PYPI_NAME:=orjson
PKG_HASH:=96163d9cdc5a202703e9ad1b9ae757d5f0ca62f4fa0cc93d1f27b0e180cc404e
PKG_MAINTAINER:=Timothy Ace <openwrt@timothyace.com>
PKG_LICENSE:=Apache-2.0 MIT
PKG_LICENSE_FILES:=LICENSE-APACHE LICENSE-MIT
PKG_CPE_ID:=cpe:/a:ijl:orjson
PKG_BUILD_DEPENDS:=python-maturin/host
include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
define Package/python3-orjson
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Fast, correct Python JSON library
URL:=https://github.com/ijl/orjson
DEPENDS:= \
+python3-light \
+python3-uuid \
$(RUST_ARCH_DEPENDS)
endef
define Package/python3-orjson/description
Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
endef
$(eval $(call Py3Package,python3-orjson))
$(eval $(call BuildPackage,python3-orjson))
$(eval $(call BuildPackage,python3-orjson-src))