Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lang/python/python-aiosignal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-aiosignal
PKG_VERSION:=1.3.1
PKG_VERSION:=1.4.0
PKG_RELEASE:=1

PYPI_NAME:=aiosignal
PKG_HASH:=54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc
PKG_HASH:=f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7

PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
Expand Down
29 changes: 29 additions & 0 deletions lang/python/python-aiosignal/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

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

python3 - << 'EOF'

from aiosignal import Signal

# Test Signal creation and basic list operations
sig = Signal(owner=object())
assert len(sig) == 0

callback = lambda: None
sig.append(callback)
assert len(sig) == 1
assert sig[0] is callback

# Test freeze
sig.freeze()
assert sig.frozen

# Test that frozen signal raises on modification
try:
sig.append(lambda: None)
assert False, "should have raised"
except RuntimeError:
pass

EOF
4 changes: 2 additions & 2 deletions lang/python/python-docutils/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-docutils
PKG_VERSION:=0.20.1
PKG_VERSION:=0.22.4
PKG_RELEASE:=1

PYPI_NAME:=docutils
PKG_HASH:=f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b
PKG_HASH:=4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968

PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
PKG_LICENSE:=Public-Domain BSD-2-License Python-2.0.1 GPL-3.0-or-later
Expand Down
28 changes: 28 additions & 0 deletions lang/python/python-docutils/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

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

python3 - << 'EOF'

import docutils.core
import docutils.parsers.rst

# Basic RST to HTML conversion
rst_input = """\
Hello World
===========

This is a **bold** paragraph with *italics*.

- item one
- item two
"""

html = docutils.core.publish_string(rst_input, writer_name="html")
html_str = html.decode("utf-8")

assert "Hello World" in html_str
assert "<strong>bold</strong>" in html_str
assert "<em>italics</em>" in html_str

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

PKG_NAME:=python-execnet
PKG_VERSION:=2.0.2
PKG_VERSION:=2.1.2
PKG_RELEASE:=1

PYPI_NAME:=execnet
PKG_HASH:=cc59bc4423742fd71ad227122eb0dd44db51efb3dc4095b45ac9a08c770096af
PKG_HASH:=63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd

PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=MIT
Expand Down
15 changes: 15 additions & 0 deletions lang/python/python-execnet/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

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

python3 - << 'EOF'

import execnet

# Verify basic module attributes exist
assert hasattr(execnet, 'makegateway')
assert hasattr(execnet, 'MultiChannel')
assert hasattr(execnet, 'Group')
assert execnet.__version__

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

PKG_NAME:=python-markdown
PKG_VERSION:=3.10
PKG_VERSION:=3.10.2
PKG_RELEASE:=1

PYPI_NAME:=markdown
PKG_HASH:=37062d4f2aa4b2b6b32aefb80faa300f82cc790cb949a35b8caede34f2b68c0e
PKG_HASH:=994d51325d25ad8aa7ce4ebaec003febcce822c3f8c911e3b17c52f7f589f950

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=BSD-3-Clause
Expand Down
23 changes: 23 additions & 0 deletions lang/python/python-markdown/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

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

python3 - << 'EOF'

import markdown

# Basic conversion
result = markdown.markdown("# Hello World")
assert result == "<h1>Hello World</h1>", f"got: {result}"

# Bold and italic
result = markdown.markdown("**bold** and *italic*")
assert "<strong>bold</strong>" in result
assert "<em>italic</em>" in result

# List
result = markdown.markdown("- item1\n- item2")
assert "<ul>" in result
assert "<li>item1</li>" in result

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

PKG_NAME:=python-pyrsistent
PKG_VERSION:=0.19.3
PKG_VERSION:=0.20.0
PKG_RELEASE:=1

PYPI_NAME:=pyrsistent
PKG_HASH:=1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440
PKG_HASH:=4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=MIT
Expand Down
29 changes: 29 additions & 0 deletions lang/python/python-pyrsistent/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

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

python3 - << 'EOF'

from pyrsistent import pmap, pvector, pset

# Persistent map
m = pmap({"a": 1, "b": 2})
m2 = m.set("c", 3)
assert m["a"] == 1
assert "c" not in m
assert m2["c"] == 3

# Persistent vector
v = pvector([1, 2, 3])
v2 = v.append(4)
assert len(v) == 3
assert len(v2) == 4
assert v2[3] == 4

# Persistent set
s = pset([1, 2, 3])
s2 = s.add(4)
assert 4 not in s
assert 4 in s2

EOF
4 changes: 2 additions & 2 deletions lang/python/python-rsa/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-rsa
PKG_VERSION:=4.9
PKG_VERSION:=4.9.1
PKG_RELEASE:=1

PYPI_NAME:=rsa
PKG_HASH:=e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21
PKG_HASH:=e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75

PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
PKG_LICENSE:=Apache-2.0
Expand Down
23 changes: 23 additions & 0 deletions lang/python/python-rsa/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

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

python3 - << 'EOF'

import rsa

# Generate keys
(pub, priv) = rsa.newkeys(512)

# Sign and verify
message = b"Hello OpenWrt"
signature = rsa.sign(message, priv, "SHA-256")
verified = rsa.verify(message, signature, pub)
assert verified == "SHA-256", f"expected SHA-256, got {verified}"

# Encrypt and decrypt
encrypted = rsa.encrypt(message, pub)
decrypted = rsa.decrypt(encrypted, priv)
assert decrypted == message, f"decryption failed"

EOF
Loading