Skip to content

Commit

Permalink
Working on Python 3.13: miniaudio pycocotools pycryptodome pycryptodo…
Browse files Browse the repository at this point in the history
…mex (closes #807) pynacl pyproj pywavelets pyzbar soxr tgcrypto yarl
  • Loading branch information
mhsmith committed Oct 23, 2024
1 parent 432281b commit 93cca63
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 133 deletions.
4 changes: 2 additions & 2 deletions server/pypi/packages/miniaudio/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: miniaudio
version: "1.59"
version: "1.61"

build:
number: 2
number: 0
2 changes: 1 addition & 1 deletion server/pypi/packages/pycocotools/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package:
name: pycocotools
version: "2.0.7"
version: "2.0.8"
4 changes: 2 additions & 2 deletions server/pypi/packages/pycryptodome/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Any change to one should also be done to the other.
package:
name: pycryptodome
version: "3.9.4"
version: "3.21.0"

build:
number: 1
number: 0
66 changes: 6 additions & 60 deletions server/pypi/packages/pycryptodome/patches/chaquopy.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
diff -ur src-original/lib/Crypto/Util/_raw_api.py src/lib/Crypto/Util/_raw_api.py
--- src-original/lib/Crypto/Util/_raw_api.py 2018-08-04 22:21:17.000000000 +0000
+++ src/lib/Crypto/Util/_raw_api.py 2019-08-24 18:50:56.520037232 +0000
@@ -255,4 +255,16 @@
cdecl)
--- aaa/lib/Crypto/Util/_raw_api.py 2024-09-30 18:09:41.000000000 +0000
+++ src/lib/Crypto/Util/_raw_api.py 2024-10-23 16:10:01.744278766 +0000
@@ -312,6 +312,18 @@
return load_lib(full_name, cdecl)
except OSError as exp:
attempts.append("Trying '%s': %s" % (filename, str(exp)))
attempts.append("Cannot load '%s': %s" % (filename, str(exp)))
+
+ # This technique will work both before and after the importer redesign in Chaquopy 6.3.
+ import pkgutil
Expand All @@ -18,58 +17,5 @@ diff -ur src-original/lib/Crypto/Util/_raw_api.py src/lib/Crypto/Util/_raw_api.p
+ attempts.append("Trying importer for '%s'" % entry)
+
raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))

def expect_byte_string(data):
--- src-original/setup.py 2019-08-31 21:16:53.000000000 +0000
+++ src/setup.py 2019-12-20 17:29:04.468809747 +0000
@@ -249,16 +249,7 @@
"Crypto.Signature",
"Crypto.Util",
"Crypto.Math",
- "Crypto.SelfTest",
- "Crypto.SelfTest.Cipher",
- "Crypto.SelfTest.Hash",
- "Crypto.SelfTest.IO",
- "Crypto.SelfTest.Protocol",
- "Crypto.SelfTest.PublicKey",
- "Crypto.SelfTest.Random",
- "Crypto.SelfTest.Signature",
- "Crypto.SelfTest.Util",
- "Crypto.SelfTest.Math",
+ # Chaquopy: removed large package Crypto.SelfTest
]
package_data = {
"Crypto" : [ "py.typed", "*.pyi" ],
@@ -271,31 +262,7 @@
"Crypto.Signature" : [ "*.pyi" ],
"Crypto.IO" : [ "*.pyi" ],
"Crypto.Util" : [ "*.pyi" ],
- "Crypto.SelfTest.Cipher" : [
- "test_vectors/AES/*.*",
- "test_vectors/TDES/*.*",
- "test_vectors/wycheproof/*.*",
- ],
- "Crypto.SelfTest.Hash" : [
- "test_vectors/SHA1/*.*",
- "test_vectors/SHA2/*.*",
- "test_vectors/SHA3/*.*",
- "test_vectors/keccak/*.*",
- "test_vectors/BLAKE2s/*.*",
- "test_vectors/BLAKE2b/*.*",
- "test_vectors/wycheproof/*.*",
- ],
- "Crypto.SelfTest.Signature" : [
- "test_vectors/DSA/*.*",
- "test_vectors/ECDSA/*.*",
- "test_vectors/PKCS1-v1.5/*.*",
- "test_vectors/PKCS1-PSS/*.*",
- "test_vectors/wycheproof/*.*",
- ],
- "Crypto.SelfTest.PublicKey" : [
- "test_vectors/ECC/*.*",
- "test_vectors/RSA/*.*",
- ],
+ # Chaquopy: removed large package Crypto.SelfTest
}

ext_modules = [

4 changes: 2 additions & 2 deletions server/pypi/packages/pycryptodomex/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Any change to one should also be done to the other.
package:
name: pycryptodomex
version: "3.9.4"
version: "3.21.0"

build:
number: 1
number: 0
66 changes: 6 additions & 60 deletions server/pypi/packages/pycryptodomex/patches/chaquopy.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
diff -ur src-original/lib/Cryptodome/Util/_raw_api.py src/lib/Cryptodome/Util/_raw_api.py
--- src-original/lib/Cryptodome/Util/_raw_api.py 2018-08-04 22:21:17.000000000 +0000
+++ src/lib/Cryptodome/Util/_raw_api.py 2019-08-24 18:50:56.520037232 +0000
@@ -255,6 +255,18 @@
cdecl)
--- aaa/lib/Cryptodome/Util/_raw_api.py 2024-09-30 18:09:41.000000000 +0000
+++ src/lib/Cryptodome/Util/_raw_api.py 2024-10-23 16:10:01.744278766 +0000
@@ -312,6 +312,18 @@
return load_lib(full_name, cdecl)
except OSError as exp:
attempts.append("Trying '%s': %s" % (filename, str(exp)))
attempts.append("Cannot load '%s': %s" % (filename, str(exp)))
+
+ # This technique will work both before and after the importer redesign in Chaquopy 6.3.
+ import pkgutil
Expand All @@ -18,58 +17,5 @@ diff -ur src-original/lib/Cryptodome/Util/_raw_api.py src/lib/Cryptodome/Util/_r
+ attempts.append("Trying importer for '%s'" % entry)
+
raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))

def expect_byte_string(data):
--- src-original/setup.py 2019-08-31 21:16:53.000000000 +0000
+++ src/setup.py 2019-12-20 17:29:04.468809747 +0000
@@ -249,16 +249,7 @@
"Crypto.Signature",
"Crypto.Util",
"Crypto.Math",
- "Crypto.SelfTest",
- "Crypto.SelfTest.Cipher",
- "Crypto.SelfTest.Hash",
- "Crypto.SelfTest.IO",
- "Crypto.SelfTest.Protocol",
- "Crypto.SelfTest.PublicKey",
- "Crypto.SelfTest.Random",
- "Crypto.SelfTest.Signature",
- "Crypto.SelfTest.Util",
- "Crypto.SelfTest.Math",
+ # Chaquopy: removed large package Crypto.SelfTest
]
package_data = {
"Crypto" : [ "py.typed", "*.pyi" ],
@@ -271,31 +262,7 @@
"Crypto.Signature" : [ "*.pyi" ],
"Crypto.IO" : [ "*.pyi" ],
"Crypto.Util" : [ "*.pyi" ],
- "Crypto.SelfTest.Cipher" : [
- "test_vectors/AES/*.*",
- "test_vectors/TDES/*.*",
- "test_vectors/wycheproof/*.*",
- ],
- "Crypto.SelfTest.Hash" : [
- "test_vectors/SHA1/*.*",
- "test_vectors/SHA2/*.*",
- "test_vectors/SHA3/*.*",
- "test_vectors/keccak/*.*",
- "test_vectors/BLAKE2s/*.*",
- "test_vectors/BLAKE2b/*.*",
- "test_vectors/wycheproof/*.*",
- ],
- "Crypto.SelfTest.Signature" : [
- "test_vectors/DSA/*.*",
- "test_vectors/ECDSA/*.*",
- "test_vectors/PKCS1-v1.5/*.*",
- "test_vectors/PKCS1-PSS/*.*",
- "test_vectors/wycheproof/*.*",
- ],
- "Crypto.SelfTest.PublicKey" : [
- "test_vectors/ECC/*.*",
- "test_vectors/RSA/*.*",
- ],
+ # Chaquopy: removed large package Crypto.SelfTest
}

ext_modules = [

11 changes: 7 additions & 4 deletions server/pypi/packages/pywavelets/patches/chaquopy.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@
from numpy import get_include as get_numpy_include
cython_modules, cython_sources = get_cython_sources(use_cython)
ext_modules = [
--- src-original/pyproject.toml 2022-09-16 14:25:42.000000000 +0000
+++ src/pyproject.toml 2023-12-06 10:36:40.960979478 +0000
@@ -7,7 +7,10 @@
--- aaa/pyproject.toml 2022-09-16 14:25:42.000000000 +0000
+++ src/pyproject.toml 2024-10-23 16:30:29.098506427 +0000
@@ -7,8 +7,12 @@
[build-system]
requires = [
"wheel",
- "setuptools<65",
- "Cython>=0.29.24,<3.0",
+
+ # Chaquopy: updated for Python 3.12
+ "setuptools==69.0.2",
+
"Cython>=0.29.24,<3.0",
+ # Chaquopy: increased Cython upper limit from 3 to 3.1 for Python 3.13.
+ "Cython>=0.29.24,<3.1",

# NumPy dependencies - to update these, sync from
# https://github.com/scipy/oldest-supported-numpy/, and then
2 changes: 1 addition & 1 deletion server/pypi/packages/soxr/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package:
name: soxr
version: "0.3.7"
version: "0.4.0"
2 changes: 1 addition & 1 deletion server/pypi/packages/yarl/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package:
name: yarl
version: "1.9.3"
version: "1.16.0"

0 comments on commit 93cca63

Please sign in to comment.