pythonPackages.pywebview: 3.3.1 -> 3.4
also fix tests by adding pyqtwebengine
This commit is contained in:
parent
ddb1c81c07
commit
1b154aacb1
@ -1,25 +1,53 @@
|
|||||||
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
{ lib
|
||||||
, importlib-resources, pytest, xvfb_run }:
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, importlib-resources
|
||||||
|
, pyqtwebengine
|
||||||
|
, pytest
|
||||||
|
, pythonOlder
|
||||||
|
, qt5
|
||||||
|
, xvfb_run
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pywebview";
|
pname = "pywebview";
|
||||||
version = "3.3.1";
|
version = "3.4";
|
||||||
disabled = pythonOlder "3.5";
|
disabled = pythonOlder "3.5";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "r0x0r";
|
owner = "r0x0r";
|
||||||
repo = "pywebview";
|
repo = "pywebview";
|
||||||
rev = version;
|
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 = ''
|
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
|
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
|
patchShebangs run.sh
|
||||||
|
wrapQtApp run.sh
|
||||||
|
|
||||||
xvfb-run -s '-screen 0 800x600x24' ./run.sh
|
xvfb-run -s '-screen 0 800x600x24' ./run.sh
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user