build + refactor: pyproject migration, controller/ui module split, UI polish#15
Merged
build + refactor: pyproject migration, controller/ui module split, UI polish#15
Conversation
Nuitka froze a pip-installed PyGObject into the binary; the frozen gi/overrides asserted against the live system GLib and crashed when glib2 evolved (#13, #14). Wheel + python-installer keeps gi in lockstep with the user's system python-gobject by construction. - Add pyproject.toml with [project.scripts] entry point - Extract main() into clipse_gui/cli.py so the entry point is importable - Reduce root clipse-gui.py to a thin dev shim - Drop Nuitka and the PyGObject pin from requirements.txt
Setuptools deprecated `license = { file = "..." }` and the
`License :: OSI Approved` classifiers; both are slated for removal in
Feb 2027. Switch to PEP 639 SPDX form (`license = "MIT"` +
`license-files = ["LICENSE"]`) and drop the redundant classifier.
Bump build-system pin to setuptools>=77, the minimum that supports
this syntax.
…thon-installer - `just build` now produces a PEP 517 wheel via `python -m build --no-isolation` - `just install` uses `python -m installer` to drop the entry-point script and package into the system prefix; icon/desktop file installed alongside as before - `just uninstall` reconstructs the wheel manifest in a temp destdir and removes every listed file from the live system, then strips the assets - `just dry-install` enumerates the manifest so users see exactly what lands where - `just build-nuitka` preserves the legacy Nuitka path for non-pacman distribution - Drop the dead duplicate `nuitka` recipe; consolidate into `build-nuitka` - Clean wheel artifacts (build/, *.egg-info) in `clean-build` - `info` and `paths` updated to reflect the new install layout
Owner
Author
|
Heads up: I'm piggybacking on this branch to also split
Pure restructuring — no behavior changes. |
Break two monoliths into navigable modules: - controller.py: 1863 -> 128 lines, composes 11 mixins under controller_mixins/ (data, style, list_view, search, item_ops, selection, clipboard, preview, scroll, keyboard, misc) - ui_components.py: 1742 -> 43-line shim, splits into 7 modules under ui/ (icons, detection, text, list_row, help, settings, preview) The shim re-exports every public name (including the legacy toggle_search_bar alias) so existing imports keep working. Pure restructuring -- no behavior changes intended.
- Header search + pin filter button: dedicated CSS classes, matching heights, accent-colored active state on pin toggle - Spinbutton: flatten internal entry and buttons into one unified control; remove duplicate focus rings and inner borders - Switch: drop redundant focus ring (state already visible via slider) - List rows: round all four corners (was right-only) - Compact mode: pick window size at startup based on config so the WM honors smaller dimensions; persistently hide search + pin filter via set_no_show_all when compact is on - Graceful exit: handle SIGINT/SIGTERM via GLib unix signal hook so Ctrl+C in terminal triggers clean shutdown (saves history, cleans up tray)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the Nuitka onefile build with a standard
pyproject.toml+python-installerworkflow. Eliminates the entire class ofgi-vs-glib2mismatch crashes that broke 0.6.0 (#13) and 0.7.0 (#14) by stopping bundlinggialtogether.Why
Nuitka froze a pip-installed
PyGObjectinto the binary. At runtime, the frozengi/overrides/GLib.pyasserted every deprecated symbol existed on the live system GLib — which, on rolling distros, eventually fails. Pinning or bumpingPyGObjectonly delays the next recurrence; the bundling pattern itself is structurally wrong for a C-binding shim.Shipping a wheel installed by
python-installerlets pacman resolvepython-gobjectagainst the user'sglib2version. The invariant holds by construction.Changes
pyproject.tomlwith[project.scripts]entry point (clipse-gui = "clipse_gui.cli:main")clipse_gui/cli.pycontainingmain()(extracted from rootclipse-gui.py) so the entry point can import it cleanlyclipse-gui.pyreduced to a thin dev shim that callsclipse_gui.cli:main— keepspython clipse-gui.pyworking from a checkoutaur/PKGBUILDreworked to usepython -m build --wheel --no-isolation+python -m installer --destdir="$pkgdir" dist/*.whl;makedependsupdated accordingly (pushed to AUR remote separately —aur/is gitignored here)requirements.txtcleaned up — Nuitka and PyGObject pin removed (no longer relevant to packaging)Out of scope
.github/workflows/release.ymlstill produces the Nuitka linux binary + AppImage as release assets. Removing those is a follow-up — wanted this PR focused on the AUR/install path that's actually broken.justfileNuitka recipes left alone — alternative builders stay available for contributors who want them.Test plan
python -m build --wheel --no-isolationproduces a valid wheel underdist/clipse-gui --versionprintsClipse GUI v0.7.0from the installed entry pointpython-gobjectmakepkg -siagainst the new PKGBUILD on this Arch host builds and installs cleanly (replaces previous0.7.0-25install, entry point launches, GUI opens)Closes / refs
Long-term fix for #13 and #14 (both already addressed acutely by AUR
0.7.0-25; this lands the structural fix on the GitHub side).