From 9b6b5efe7793d26762f32eb1164fb66308ab931b Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 11 Mar 2026 09:45:04 -0700 Subject: [PATCH] Simplify Plugin Collection --- pdm.lock | 8 +++--- pyproject.toml | 2 +- tests/unit/qt/test_update_controller.py | 2 +- tool/pyinstaller/synodic.spec | 34 +++---------------------- 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/pdm.lock b/pdm.lock index df4dd57..27f8ee7 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "build", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:52b09137c7599dc609e087bb58f7ced9bd9940ac53f77e0b6401eeb30d3f6bb3" +content_hash = "sha256:503d9c28c08a152250042e09282d3a4e727af0d4aac551c4e0fcb92dc06459bf" [[metadata.targets]] requires_python = ">=3.14,<3.15" @@ -336,7 +336,7 @@ files = [ [[package]] name = "porringer" -version = "0.2.1.dev79" +version = "0.2.1.dev80" requires_python = ">=3.14" summary = "" groups = ["default"] @@ -349,8 +349,8 @@ dependencies = [ "userpath>=1.9.2", ] files = [ - {file = "porringer-0.2.1.dev79-py3-none-any.whl", hash = "sha256:fa010a1887f376827d154794dfa1ec8552263fb596e987bea8fa2e0e3920e478"}, - {file = "porringer-0.2.1.dev79.tar.gz", hash = "sha256:328de37f930e0042341378037c1b3bb9e36479485748f01569d8fac0936883df"}, + {file = "porringer-0.2.1.dev80-py3-none-any.whl", hash = "sha256:af53ed2b9f40900898b226694d5f49c65d8eda5487132781fafa9dca7504e4b7"}, + {file = "porringer-0.2.1.dev80.tar.gz", hash = "sha256:aa40413b26d14391cd8c565dc1e2168a73b5f5e15fce16372d99998714ebf903"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 1eb06d0..8c31172 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ requires-python = ">=3.14, <3.15" dependencies = [ "pyside6>=6.10.2", "packaging>=26.0", - "porringer>=0.2.1.dev79", + "porringer>=0.2.1.dev80", "qasync>=0.28.0", "velopack>=0.0.1444.dev49733", "typer>=0.24.1", diff --git a/tests/unit/qt/test_update_controller.py b/tests/unit/qt/test_update_controller.py index f3a73e4..fcef507 100644 --- a/tests/unit/qt/test_update_controller.py +++ b/tests/unit/qt/test_update_controller.py @@ -23,7 +23,6 @@ UpdateInfo, ) - # --------------------------------------------------------------------------- # Helpers # --------------------------------------------------------------------------- @@ -43,6 +42,7 @@ def __init__(self, model: UpdateModel) -> None: model.restart_visible_changed.connect(self.restart_visible.append) model.last_checked_changed.connect(self.last_checked.append) + # --------------------------------------------------------------------------- # Helpers # --------------------------------------------------------------------------- diff --git a/tool/pyinstaller/synodic.spec b/tool/pyinstaller/synodic.spec index a6b30b1..e132b41 100644 --- a/tool/pyinstaller/synodic.spec +++ b/tool/pyinstaller/synodic.spec @@ -1,46 +1,20 @@ # -*- mode: python ; coding: utf-8 -*- from pathlib import Path -from PyInstaller.utils.hooks import copy_metadata +from PyInstaller.utils.hooks import collect_submodules, copy_metadata SPEC_DIR = Path(SPECPATH) REPO_ROOT = SPEC_DIR.parent.parent # Collect porringer and its plugins with metadata datas = [(str(REPO_ROOT / 'data'), 'data')] -hiddenimports = [] # Add porringer metadata so entry points work datas += copy_metadata('porringer') -# Porringer bundled plugins (discovered via entry points at runtime). -# Keep in sync with porringer's pyproject.toml [project.entry-points.*] groups. -hiddenimports += [ - # porringer.environment - 'porringer.plugin.apt.plugin', - 'porringer.plugin.brew.plugin', - 'porringer.plugin.bun.plugin', - 'porringer.plugin.deno.plugin', - 'porringer.plugin.npm.plugin', - 'porringer.plugin.pim.plugin', - 'porringer.plugin.pip.plugin', - 'porringer.plugin.pipx.plugin', - 'porringer.plugin.pnpm.plugin', - 'porringer.plugin.pyenv.plugin', - 'porringer.plugin.uv.plugin', - 'porringer.plugin.winget.plugin', - # porringer.project_environment - 'porringer.plugin.bun_project.plugin', - 'porringer.plugin.deno_project.plugin', - 'porringer.plugin.npm_project.plugin', - 'porringer.plugin.pdm.plugin', - 'porringer.plugin.pnpm_project.plugin', - 'porringer.plugin.poetry.plugin', - 'porringer.plugin.uv_project.plugin', - 'porringer.plugin.yarn_project.plugin', - # porringer.scm - 'porringer.plugin.git.plugin', -] +# Auto-discover all porringer plugin modules so new upstream plugins +# are bundled without manual spec updates. +hiddenimports = collect_submodules('porringer.plugin') a = Analysis( [str(REPO_ROOT / 'synodic_client' / 'application' / 'bootstrap.py')],