@@ -218,10 +218,10 @@ index 9a3c91ae..0632c904 100644
218
218
run:
219
219
diff --git a/packages/aiohttp/patches/0001-pyodide-connection.patch b/packages/aiohttp/patches/0001-pyodide-connection.patch
220
220
new file mode 100644
221
- index 00000000..c9603ab2
221
+ index 00000000..c467f617
222
222
--- /dev/null
223
223
+++ b/packages/aiohttp/patches/0001-pyodide-connection.patch
224
- @@ -0,0 +1,293 @@
224
+ @@ -0,0 +1,306 @@
225
225
+ diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py
226
226
+ index 8bc7a4aa..b6debab6 100644
227
227
+ --- a/aiohttp/__init__.py
@@ -234,10 +234,10 @@ index 00000000..c9603ab2
234
234
+ +from . import patch
235
235
+ diff --git a/aiohttp/patch.py b/aiohttp/patch.py
236
236
+ new file mode 100644
237
- + index 00000000..fc6e65d1
237
+ + index 00000000..1797e846
238
238
+ --- /dev/null
239
239
+ +++ b/aiohttp/patch.py
240
- + @@ -0,0 +1,277 @@
240
+ + @@ -0,0 +1,290 @@
241
241
+ +from collections.abc import Iterable
242
242
+ +from contextlib import suppress
243
243
+ +from io import BytesIO
@@ -428,14 +428,21 @@ index 00000000..c9603ab2
428
428
+ + session=req._session,
429
429
+ + )
430
430
+ +
431
- + + from js import XMLHttpRequest
431
+ + + import js
432
432
+ + from pyodide.ffi import to_js
433
433
+ +
434
- + + xhr = XMLHttpRequest.new()
434
+ + + xhr = js. XMLHttpRequest.new()
435
435
+ + xhr.responseType = "arraybuffer"
436
436
+ + xhr.timeout = int(real_timeout.total * 1000)
437
437
+ +
438
- + + xhr.open(req.method, str(req.url), False)
438
+ + + url = str(req.url)
439
+ + + same_origin = js.URL.new(url).origin == js.location.origin
440
+ + +
441
+ + + # use a CORS proxy for cross-origin requests
442
+ + + if not same_origin:
443
+ + + url = f"https://proxy.climet.eu/{url}"
444
+ + +
445
+ + + xhr.open(req.method, url, False)
439
446
+ + for name, value in headers.items():
440
447
+ + if name.lower() not in ("user-agent",):
441
448
+ + xhr.setRequestHeader(name, value)
@@ -445,9 +452,15 @@ index 00000000..c9603ab2
445
452
+ + from email.parser import Parser
446
453
+ + headers = dict(Parser().parsestr(xhr.getAllResponseHeaders()))
447
454
+ + body = xhr.response.to_py().tobytes()
455
+ + + status = xhr.status
456
+ + +
457
+ + + # redirect codes 301, 302, 303, 307, and 308 are hidden in 2xx codes
458
+ + + # by the proxy since browsers follow redirects automatically
459
+ + + if (not same_origin) and (status in [251, 252, 253, 257, 258]):
460
+ + + status += 50
448
461
+ +
449
462
+ + resp.version = version
450
- + + resp.status = xhr. status
463
+ + + resp.status = status
451
464
+ + resp.reason = xhr.statusText
452
465
+ + # This is not quite correct in handling of repeated headers
453
466
+ + resp._headers = CIMultiDict(headers)
@@ -2072,8 +2085,31 @@ index 00000000..98de1e7b
2072
2085
+ vendor-sharedlib: true
2073
2086
+ script: |
2074
2087
+ cp ${WASM_LIBRARY_DIR}/lib/libgit2.so git2/
2088
+ diff --git a/packages/h5netcdf/meta.yaml b/packages/h5netcdf/meta.yaml
2089
+ new file mode 100644
2090
+ index 00000000..59d3abbf
2091
+ --- /dev/null
2092
+ +++ b/packages/h5netcdf/meta.yaml
2093
+ @@ -0,0 +1,17 @@
2094
+ + package:
2095
+ + name: h5netcdf
2096
+ + version: 1.3.0
2097
+ + top-level:
2098
+ + - h5netcdf
2099
+ + requirements:
2100
+ + run:
2101
+ + - h5py
2102
+ + - packaging
2103
+ + source:
2104
+ + url: https://files.pythonhosted.org/packages/68/2d/63851081b19d1ccf245091255797cb358c53c886609b5056da5457f7dbbf/h5netcdf-1.3.0-py3-none-any.whl
2105
+ + sha256: f2df69dcd3665dc9c4d43eb6529dedd113b2508090d12ac973573305a8406465
2106
+ + about:
2107
+ + home: "https://github.com/h5netcdf/h5netcdf"
2108
+ + PyPI: https://pypi.org/project/h5netcdf
2109
+ + summary: netCDF4 via h5py
2110
+ + license: BSD-3-Clause
2075
2111
diff --git a/packages/h5py/meta.yaml b/packages/h5py/meta.yaml
2076
- index 3e67ba26..0e4c7b3c 100644
2112
+ index 3e67ba26..e3b3e76f 100644
2077
2113
--- a/packages/h5py/meta.yaml
2078
2114
+++ b/packages/h5py/meta.yaml
2079
2115
@@ -1,14 +1,19 @@
@@ -2092,7 +2128,7 @@ index 3e67ba26..0e4c7b3c 100644
2092
2128
- patches/0001-Fix-incompatible-pointer-type.patch
2093
2129
- patches/configure.patch
2094
2130
+ about:
2095
- + home: ""
2131
+ + home: https://github.com/h5py/h5py
2096
2132
+ PyPI: https://pypi.org/project/h5py
2097
2133
+ summary: Read and write HDF5 files from Python
2098
2134
+ license: BSD-3-Clause
0 commit comments