From 4d4593de28cfede6b71e9d315e1263fd2cca56f0 Mon Sep 17 00:00:00 2001 From: jiayuqi7813 <1783671926@qq.com> Date: Fri, 9 Oct 2026 12:18:30 +0800 Subject: [PATCH] fix(release): support Intel macOS runtime dependencies --- CHANGELOG.md | 1 + pyproject.toml | 4 +++ scripts/build_desktop_runtime.py | 2 +- uv.lock | 54 ++++++++++++++++++++++++++++++-- 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c95430c..a8dd82b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ All notable public release changes are tracked here. - Fixed the Web interface freezing while deleting an Agent credential and detaching its conversation and Worker references, as reported with Ubuntu container deployments ([#199](https://github.com/FishCodeTech/muteki/issues/199)). - Fixed desktop notification ownership, permission persistence, foreground read tracking, and controlled overlay interactions. - Fixed Worker settings navigation, stale draft runtime panels, local directory error feedback, and findings counts for older penetration-testing reports. +- Kept a compatible ONNX Runtime version for Intel macOS so the bundled Python environment installs and loads Magika correctly; other platforms retain their existing runtime version. ### Upgrade diff --git a/pyproject.toml b/pyproject.toml index 3550494..551b838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,10 @@ dependencies = [ "numpy>=2.4.6", "scipy>=1.17.1", "magika>=1.0.3", + # Keep Python 3.13 Intel macOS on the last ORT release with an x86_64 wheel. + "onnxruntime==1.23.2; python_version == '3.13' and sys_platform == 'darwin' and platform_machine == 'x86_64'", + # This floor forces a separate uv lock fork while allowing future upgrades elsewhere. + "onnxruntime>=1.26.0; python_version == '3.13' and (sys_platform != 'darwin' or platform_machine != 'x86_64')", "scapy>=2.7.0", "pyzbar>=0.1.9", "zxing-cpp>=3.0.0", diff --git a/scripts/build_desktop_runtime.py b/scripts/build_desktop_runtime.py index 386b505..0aea1a5 100644 --- a/scripts/build_desktop_runtime.py +++ b/scripts/build_desktop_runtime.py @@ -171,7 +171,7 @@ def main() -> None: if destination.exists(): shutil.rmtree(destination) staging.rename(destination) - subprocess.run([str(destination / manifest["python"]), "-I", "-B", "-c", "import fastapi, uvicorn, pydantic, sqlite3, numpy; print('Desktop Python runtime ready')"], cwd=build, check=True) + subprocess.run([str(destination / manifest["python"]), "-I", "-B", "-c", "import fastapi, uvicorn, pydantic, sqlite3, numpy; from magika import Magika; Magika(); print('Desktop Python runtime ready')"], cwd=build, check=True) subprocess.run([str(destination / manifest["node"]), str(destination / "npm-package/bin/npm-cli.js"), "--version"], cwd=build, check=True) print(destination) diff --git a/uv.lock b/uv.lock index a2fbaea..123e1f3 100644 --- a/uv.lock +++ b/uv.lock @@ -3,7 +3,8 @@ revision = 3 requires-python = ">=3.13" resolution-markers = [ "python_full_version >= '3.14'", - "python_full_version < '3.14'", + "python_full_version < '3.14' and platform_machine == 'x86_64' and sys_platform == 'darwin'", + "(python_full_version < '3.14' and platform_machine != 'x86_64') or (python_full_version < '3.14' and sys_platform != 'darwin')", ] [[package]] @@ -255,6 +256,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] +[[package]] +name = "coloredlogs" +version = "15.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "humanfriendly" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cc/c7/eed8f27100517e8c0e6b923d5f0845d0cb99763da6fdee00478f91db7325/coloredlogs-15.0.1.tar.gz", hash = "sha256:7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0", size = 278520, upload-time = "2021-06-11T10:22:45.202Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/06/3d6badcf13db419e25b07041d9c7b4a2c331d3f4e7134445ec5df57714cd/coloredlogs-15.0.1-py2.py3-none-any.whl", hash = "sha256:612ee75c546f53e92e70049c9dbfcc18c935a2b9a53b66085ce9ef6a6e5c0934", size = 46018, upload-time = "2021-06-11T10:22:42.561Z" }, +] + [[package]] name = "cryptography" version = "50.0.1" @@ -457,6 +470,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d2/fd/6668e5aec43ab844de6fc74927e155a3b37bf40d7c3790e49fc0406b6578/httpx_sse-0.4.3-py3-none-any.whl", hash = "sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", size = 8960, upload-time = "2025-10-10T21:48:21.158Z" }, ] +[[package]] +name = "humanfriendly" +version = "10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz", hash = "sha256:6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc", size = 360702, upload-time = "2021-09-17T21:40:43.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f0/0f/310fb31e39e2d734ccaa2c0fb981ee41f7bd5056ce9bc29b2248bd569169/humanfriendly-10.0-py2.py3-none-any.whl", hash = "sha256:1697e1a8a8f550fd43c2865cd84542fc175a61dcb779b6fee18cf6b6ccba1477", size = 86794, upload-time = "2021-09-17T21:40:39.897Z" }, +] + [[package]] name = "idna" version = "3.17" @@ -529,7 +551,8 @@ version = "1.0.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, - { name = "onnxruntime" }, + { name = "onnxruntime", version = "1.23.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14' and platform_machine == 'x86_64' and sys_platform == 'darwin'" }, + { name = "onnxruntime", version = "1.26.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14' or platform_machine != 'x86_64' or sys_platform != 'darwin'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/00/be/fa7d512ec15763ad7d8ba083e39bb445fa969ce5159361fa449a02569cf9/magika-1.0.3.tar.gz", hash = "sha256:ad3216012f6dd337be34c23ae3dfab36f0623bc62fbfb329f9a1852c9ad40304", size = 3041970, upload-time = "2026-05-04T08:41:53.124Z" } wheels = [ @@ -623,10 +646,33 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/43/bb/e1c71a4295b1b1d1393d50dbb4f2a36283c6859d9d3892e84f00ec5a91d5/numpy-2.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:0c9136e14ed34a9e343a31c533d78a9813a69a3148332bce5e9821cb2f996e66", size = 10565867, upload-time = "2026-05-18T23:36:47.114Z" }, ] +[[package]] +name = "onnxruntime" +version = "1.23.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.14' and platform_machine == 'x86_64' and sys_platform == 'darwin'", +] +dependencies = [ + { name = "coloredlogs" }, + { name = "flatbuffers" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "protobuf" }, + { name = "sympy" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/f9/2d49ca491c6a986acce9f1d1d5fc2099108958cc1710c28e89a032c9cfe9/onnxruntime-1.23.2-cp313-cp313-macosx_13_0_x86_64.whl", hash = "sha256:162f4ca894ec3de1a6fd53589e511e06ecdc3ff646849b62a9da7489dee9ce95", size = 19157691, upload-time = "2025-10-22T03:46:43.518Z" }, +] + [[package]] name = "onnxruntime" version = "1.26.0" source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.14'", + "(python_full_version < '3.14' and platform_machine != 'x86_64') or (python_full_version < '3.14' and sys_platform != 'darwin')", +] dependencies = [ { name = "flatbuffers" }, { name = "numpy" }, @@ -735,6 +781,8 @@ dependencies = [ { name = "magika" }, { name = "mcp" }, { name = "numpy" }, + { name = "onnxruntime", version = "1.23.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14' and platform_machine == 'x86_64' and sys_platform == 'darwin'" }, + { name = "onnxruntime", version = "1.26.0", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.14' and platform_machine != 'x86_64') or (python_full_version < '3.14' and sys_platform != 'darwin')" }, { name = "pillow" }, { name = "pycryptodome" }, { name = "pydantic" }, @@ -770,6 +818,8 @@ requires-dist = [ { name = "magika", specifier = ">=1.0.3" }, { name = "mcp", specifier = ">=1.10,<2" }, { name = "numpy", specifier = ">=2.4.6" }, + { name = "onnxruntime", marker = "python_full_version == '3.13.*' and platform_machine == 'x86_64' and sys_platform == 'darwin'", specifier = "==1.23.2" }, + { name = "onnxruntime", marker = "(python_full_version == '3.13.*' and platform_machine != 'x86_64') or (python_full_version == '3.13.*' and sys_platform != 'darwin')", specifier = ">=1.26.0" }, { name = "pillow", specifier = ">=12.2.0" }, { name = "pycryptodome", specifier = ">=3.23.0" }, { name = "pydantic", specifier = ">=2.7" },