From e621b5add5aa1786875dbb8d2d59361937908e4a Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 31 Aug 2025 15:21:58 +0300 Subject: [PATCH] python313Packages.pywebview: fix, use Qt 6, modernize Tests are unfortunately dead now because they segfault somewhere deep in qtwebengine code, jellyfin-mpv-shim seems to run normally though. --- .../python-modules/pywebview/default.nix | 44 +++---------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/pkgs/development/python-modules/pywebview/default.nix b/pkgs/development/python-modules/pywebview/default.nix index 935d20a765bf..ff19b1a035ed 100644 --- a/pkgs/development/python-modules/pywebview/default.nix +++ b/pkgs/development/python-modules/pywebview/default.nix @@ -4,16 +4,11 @@ fetchFromGitHub, setuptools-scm, bottle, - importlib-resources, proxy-tools, - pygobject3, - pyqtwebengine, - pytest, - pythonOlder, - qt5, + pyside6, qtpy, six, - xvfb-run, + typing-extensions, }: buildPythonPackage rec { @@ -21,8 +16,6 @@ buildPythonPackage rec { version = "6.0"; pyproject = true; - disabled = pythonOlder "3.5"; - src = fetchFromGitHub { owner = "r0x0r"; repo = "pywebview"; @@ -30,40 +23,17 @@ buildPythonPackage rec { hash = "sha256-EuDm3Ixw1z5xwpl4U15Xwg5mE3dXslTvv0N0XyjxrAg="; }; - nativeBuildInputs = [ - setuptools-scm - qt5.wrapQtAppsHook - ]; + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ bottle - pyqtwebengine + pyside6 proxy-tools - six - ] - ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ]; - - nativeCheckInputs = [ - pygobject3 - pytest qtpy - xvfb-run + six + typing-extensions ]; - checkPhase = '' - # a Qt wrapper is required to run the Qt backend - # since the upstream script does not have a way to disable tests individually pytest is used directly instead - makeQtWrapper "$(command -v pytest)" tests/run.sh \ - --set PYWEBVIEW_LOG debug \ - --add-flags "--deselect tests/test_js_api.py::test_concurrent" - - # HOME and XDG directories are required for the tests - env \ - HOME=$TMPDIR \ - XDG_RUNTIME_DIR=$TMPDIR/xdg-runtime-dir \ - xvfb-run -s '-screen 0 800x600x24' tests/run.sh - ''; - pythonImportsCheck = [ "webview" ]; meta = with lib; {