Skip to content
6 changes: 3 additions & 3 deletions lang/python/python-asgiref/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-asgiref
PKG_VERSION:=3.7.2
PKG_RELEASE:=2
PKG_VERSION:=3.11.1
PKG_RELEASE:=1

PYPI_NAME:=asgiref
PKG_HASH:=9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
PKG_HASH:=5f184dc43b7e763efe848065441eac62229c9f7b0475f41f80e207a114eda4ce

PKG_BUILD_DEPENDS:=python-setuptools/host

Expand Down
24 changes: 24 additions & 0 deletions lang/python/python-asgiref/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
[ "$1" = python3-asgiref ] || exit 0
python3 - << 'EOF'
import asgiref
assert asgiref.__version__, "asgiref version is empty"

from asgiref.sync import async_to_sync, sync_to_async
import asyncio

async def async_add(a, b):
return a + b

result = async_to_sync(async_add)(3, 4)
assert result == 7, f"async_to_sync failed: {result}"

def sync_mul(a, b):
return a * b

async def run():
result = await sync_to_async(sync_mul)(6, 7)
assert result == 42, f"sync_to_async failed: {result}"

asyncio.run(run())
EOF
8 changes: 5 additions & 3 deletions lang/python/python-async-timeout/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-async-timeout
PKG_VERSION:=4.0.2
PKG_VERSION:=5.0.1
PKG_RELEASE:=1

PYPI_NAME:=async-timeout
PKG_HASH:=2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15
PYPI_SOURCE_NAME:=async_timeout
PKG_HASH:=d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=Apache-2.0
Expand All @@ -30,7 +31,8 @@ define Package/python3-async-timeout
URL:=https://github.com/aio-libs/async-timeout
DEPENDS:= \
+python3-light \
+python3-asyncio
+python3-asyncio \
+python3-logging
endef

define Package/python3-async-timeout/description
Expand Down
32 changes: 32 additions & 0 deletions lang/python/python-async-timeout/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh
[ "$1" = python3-async-timeout ] || exit 0

python3 - << 'EOF'
import asyncio
import async_timeout

async def test_no_timeout():
async with async_timeout.timeout(10):
await asyncio.sleep(0)
print("no_timeout OK")

async def test_timeout_fires():
try:
async with async_timeout.timeout(0.01):
await asyncio.sleep(1)
assert False, "Should have timed out"
except asyncio.TimeoutError:
print("timeout_fires OK")

async def test_timeout_none():
async with async_timeout.timeout(None):
await asyncio.sleep(0)
print("timeout_none OK")

async def main():
await test_no_timeout()
await test_timeout_fires()
await test_timeout_none()

asyncio.run(main())
EOF
4 changes: 2 additions & 2 deletions lang/python/python-cachelib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-cachelib
PKG_VERSION:=0.10.2
PKG_VERSION:=0.13.0
PKG_RELEASE:=1

PYPI_NAME:=cachelib
PKG_HASH:=593faeee62a7c037d50fc835617a01b887503f972fb52b188ae7e50e9cb69740
PKG_HASH:=209d8996e3c57595bee274ff97116d1d73c4980b2fd9a34c7846cd07fd2e1a48

PKG_MAINTAINER:=Stepan Henek <stepan.henek@nic.cz>
PKG_LICENSE:=BSD-3-Clause
Expand Down
21 changes: 21 additions & 0 deletions lang/python/python-cachelib/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
[ "$1" = python3-cachelib ] || exit 0
python3 - << 'EOF'
from cachelib import SimpleCache, NullCache

cache = SimpleCache()
cache.set("key", "value")
assert cache.get("key") == "value", "SimpleCache set/get failed"
assert cache.get("missing") is None
cache.delete("key")
assert cache.get("key") is None, "delete failed"

cache.set("a", 1)
cache.set("b", 2)
cache.clear()
assert cache.get("a") is None, "clear failed"

null = NullCache()
null.set("k", "v")
assert null.get("k") is None, "NullCache should not store"
EOF
6 changes: 3 additions & 3 deletions lang/python/python-dns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-dns
PKG_VERSION:=2.4.1
PKG_VERSION:=2.8.0
PKG_RELEASE:=1

PYPI_NAME:=dnspython
PKG_HASH:=c33971c79af5be968bb897e95c2448e11a645ee84d93b265ce0b7aabe5dfdca8
PKG_HASH:=181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f

PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>

PKG_BUILD_DEPENDS:=python-poetry-core/host
PKG_BUILD_DEPENDS:=python-hatchling/host

include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
Expand Down
22 changes: 22 additions & 0 deletions lang/python/python-dns/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
[ "$1" = python3-dns ] || exit 0
python3 - << 'EOF'
import dns
import dns.name
import dns.rdatatype
import dns.rdata
import dns.rdataset
import dns.message
import dns.resolver

n = dns.name.from_text("www.example.com.")
assert str(n) == "www.example.com.", f"unexpected name: {n}"
assert n.is_absolute()

parent = dns.name.from_text("example.com.")
assert n.is_subdomain(parent)

rdtype = dns.rdatatype.from_text("A")
assert rdtype == dns.rdatatype.A
assert dns.rdatatype.to_text(rdtype) == "A"
EOF
4 changes: 2 additions & 2 deletions lang/python/python-jsonschema-specifications/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-jsonschema-specifications
PKG_VERSION:=2023.11.2
PKG_VERSION:=2025.9.1
PKG_RELEASE:=1

PYPI_NAME:=jsonschema-specifications
PYPI_SOURCE_NAME:=jsonschema_specifications
PKG_HASH:=9472fc4fea474cd74bea4a2b190daeccb5a9e4db2ea80efcf7a1b582fc9a81b8
PKG_HASH:=b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d

PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
Expand Down
5 changes: 3 additions & 2 deletions lang/python/python-orjson/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-orjson
PKG_VERSION:=3.10.12
PKG_VERSION:=3.11.8
PKG_RELEASE:=1

PYPI_NAME:=orjson
PKG_HASH:=0a78bbda3aea0f9f079057ee1ee8a1ecf790d4f1af88dd67493c6b8ee52506ff
PKG_HASH:=96163d9cdc5a202703e9ad1b9ae757d5f0ca62f4fa0cc93d1f27b0e180cc404e

PKG_MAINTAINER:=Timothy Ace <openwrt@timothyace.com>
PKG_LICENSE:=Apache-2.0 MIT
Expand All @@ -26,6 +26,7 @@ define Package/python3-orjson
URL:=https://github.com/ijl/orjson
DEPENDS:= \
+python3-light \
+python3-uuid \
$(RUST_ARCH_DEPENDS)
endef

Expand Down
38 changes: 38 additions & 0 deletions lang/python/python-orjson/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

[ "$1" = python3-orjson ] || exit 0

python3 - << 'EOF'
import faulthandler
faulthandler.enable()

print("importing orjson...", flush=True)
import orjson
print("import OK", flush=True)

# Basic encode/decode
data = {"key": "value", "number": 42, "flag": True, "empty": None}
encoded = orjson.dumps(data)
assert isinstance(encoded, bytes)
decoded = orjson.loads(encoded)
assert decoded == data
print("basic encode/decode OK", flush=True)

# List roundtrip
lst = [1, 2, 3, "hello"]
assert orjson.loads(orjson.dumps(lst)) == lst
print("list roundtrip OK", flush=True)

# Nested structures
nested = {"a": {"b": {"c": 1}}}
assert orjson.loads(orjson.dumps(nested)) == nested
print("nested OK", flush=True)

# OPT_SORT_KEYS option
obj = {"z": 1, "a": 2, "m": 3}
sorted_json = orjson.dumps(obj, option=orjson.OPT_SORT_KEYS)
assert sorted_json == b'{"a":2,"m":3,"z":1}'
print("sort_keys OK", flush=True)

print("orjson OK")
EOF
4 changes: 2 additions & 2 deletions lang/python/python-pathspec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-pathspec
PKG_VERSION:=0.12.1
PKG_VERSION:=1.0.4
PKG_RELEASE:=1

PYPI_NAME:=pathspec
PKG_HASH:=a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712
PKG_HASH:=0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645

PKG_LICENSE:=MPL-2.0
PKG_LICENSE_FILES:=LICENSE
Expand Down
12 changes: 12 additions & 0 deletions lang/python/python-pathspec/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
[ "$1" = python3-pathspec ] || exit 0
python3 - << 'EOF'
import pathspec
assert pathspec.__version__, "pathspec version is empty"

spec = pathspec.PathSpec.from_lines("gitwildmatch", ["*.py", "!test_*.py", "build/"])
assert spec.match_file("foo.py")
assert not spec.match_file("test_foo.py")
assert spec.match_file("build/output.txt")
assert not spec.match_file("foo.txt")
EOF
11 changes: 6 additions & 5 deletions lang/python/python-pip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-pip
PKG_VERSION:=23.3.1
PKG_VERSION:=26.0.1
PKG_RELEASE:=1

PYPI_NAME:=pip
PKG_HASH:=1fcaa041308d01f14575f6d0d2ea4b75a3e2871fe4f9c694976f908768e14174
PKG_HASH:=c4037d8a277c89b320abe636d59f91e6d0922d08a05b60e85e53b296613346d8

PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_CPE_ID:=cpe:/a:pypa:pip

PKG_BUILD_DEPENDS:=python-setuptools/host

include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
Expand All @@ -43,9 +45,8 @@ endef

define Py3Package/python3-pip/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin/
$(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3
$(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pip3 $(1)/usr/bin/
$(LN) pip3 $(1)/usr/bin/pip

$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/pip.conf $(1)/etc/
Expand Down
23 changes: 13 additions & 10 deletions lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
--- a/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
+++ b/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
@@ -11,8 +11,14 @@ try:
@@ -11,11 +11,17 @@ try:
except AttributeError:
# Python 3.8 compatibility
def _in_proc_script_path():
- return resources.path(__package__, '_in_process.py')
+ filename = '_in_process.pyc'
+ if resources.is_resource(__package__, '_in_process.py'):
+ filename = '_in_process.py'
- return resources.path(__package__, "_in_process.py")
+ filename = "_in_process.pyc"
+ if resources.is_resource(__package__, "_in_process.py"):
+ filename = "_in_process.py"
+ return resources.path(__package__, filename)

else:

def _in_proc_script_path():
+ filename = '_in_process.pyc'
+ if resources.files(__package__).joinpath('_in_process.py').is_file():
+ filename = '_in_process.py'
+ filename = "_in_process.pyc"
+ if resources.files(__package__).joinpath("_in_process.py").is_file():
+ filename = "_in_process.py"
return resources.as_file(
- resources.files(__package__).joinpath('_in_process.py'))
+ resources.files(__package__).joinpath(filename))
- resources.files(__package__).joinpath("_in_process.py")
+ resources.files(__package__).joinpath(filename)
)
4 changes: 2 additions & 2 deletions lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/pip/_internal/build_env.py
+++ b/src/pip/_internal/build_env.py
@@ -54,7 +54,11 @@ def get_runnable_pip() -> str:
@@ -74,7 +74,11 @@ def get_runnable_pip() -> str:
# case, we can use that directly.
return str(source)

Expand All @@ -12,4 +12,4 @@
+ return os.fsdecode(source / filename)


def _get_system_sitepackages() -> Set[str]:
def _get_system_sitepackages() -> set[str]:
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Patch-Name: disable-pip-version-check.patch

--- a/src/pip/_internal/cli/cmdoptions.py
+++ b/src/pip/_internal/cli/cmdoptions.py
@@ -895,7 +895,7 @@ disable_pip_version_check: Callable[...,
@@ -1069,7 +1069,7 @@ disable_pip_version_check: Callable[...,
"--disable-pip-version-check",
dest="disable_pip_version_check",
action="store_true",
Expand Down
7 changes: 4 additions & 3 deletions lang/python/python-pyasn1-modules/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-pyasn1-modules
PKG_VERSION:=0.2.8
PKG_RELEASE:=2
PKG_VERSION:=0.4.2
PKG_RELEASE:=1

PYPI_NAME:=pyasn1-modules
PKG_HASH:=905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e
PYPI_SOURCE_NAME:=pyasn1_modules
PKG_HASH:=677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6

PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.txt
Expand Down
Loading
Loading