Merge pull request #115915 from jojosch/pywebview-3.4

pythonPackages.pywebview: 3.3.1 -> 3.4
This commit is contained in:
Sandro 2021-04-08 02:25:12 +02:00 committed by GitHub
commit 0e987c60c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,53 @@
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
, importlib-resources, pytest, xvfb_run }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-resources
, pyqtwebengine
, pytest
, pythonOlder
, qt5
, xvfb_run
}:
buildPythonPackage rec {
pname = "pywebview";
version = "3.3.1";
version = "3.4";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "r0x0r";
repo = "pywebview";
rev = version;
sha256 = "015z7n0hdgkzn0p7aw1xsv6lwc260p8q67jx0zyd1zghnwyj8k79";
sha256 = "sha256-3JHwtw8oReolEl4k8cdt7GCVGNkfWWJN6EnZYHxzDO8=";
};
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ importlib-resources ];
nativeBuildInputs = [
qt5.wrapQtAppsHook
];
checkInputs = [ pytest xvfb_run ];
propagatedBuildInputs = [
pyqtwebengine
] ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ];
checkInputs = [
pytest
xvfb_run
];
checkPhase = ''
# Cannot create directory /homeless-shelter/.... Error: FILE_ERROR_ACCESS_DENIED
export HOME=$TMPDIR
# QStandardPaths: XDG_RUNTIME_DIR not set
export XDG_RUNTIME_DIR=$HOME/xdg-runtime-dir
pushd tests
substituteInPlace run.sh \
--replace "PYTHONPATH=.." "PYTHONPATH=$PYTHONPATH" \
--replace "pywebviewtest test_js_api.py::test_concurrent ''${PYTEST_OPTIONS}" "# skip flaky test_js_api.py::test_concurrent"
patchShebangs run.sh
wrapQtApp run.sh
xvfb-run -s '-screen 0 800x600x24' ./run.sh
popd
'';