New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pythonPackages.pywebview: 3.2 -> 3.3.1 #91926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Diff needs improvement. See comments on enabling for python3.5->3.6
- No built-in tests run. Try using
doCheck = true; checkPhase = "pushd tests && ./run.sh && popd";
- I haven't tried building/testing this yet.
|
||
buildPythonPackage rec { | ||
pname = "pywebview"; | ||
version = "3.2"; | ||
version = "3.3.1"; | ||
disabled = pythonOlder "3.7"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disabled = pythonOlder "3.7"; | |
disabled = pythonOlder "3.5"; |
It sounds like this package will technically work on python3.5 & python3.6 (it's tested on Travis against 3.5), it just needs an extra package (that's what the error meant). Here are the modifications you'll need to make:
- Add
importlib-resources
argument to the top - Add
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [importlib-resources];
at the level ofsrc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented these changes. But now i'm back with my problem regarding missing GUI dependencies (see my initial PR which added pywebview
as a dependency for jellyfin-mpv-shim
: #81817 (comment)).
Are you familiar on how to properly add the various dependencies (QT/GTK/...) and maybe give me some hints?
I tried adding e.g. pyqt5
to the inputs list but the tests still complained about ModuleNotFoundError: No module named 'PyQt5'
and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not terribly familiar with GTK, but I've dealt a little w/ pyqt5 in the past.
At a guess, the scripts need to be wrapped with the wrapQtAppsHook
, but a little bit of trickery is actually needed to run Qt apps with python (i.e. for testing this package).
- Example program (not python): https://github.com/NixOS/nixpkgs/pull/89345/files
- Nix Manual: https://nixos.org/nixpkgs/manual/#sec-language-qt. Note this callout on Python apps:
Note: wrapQtAppsHook ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
Note about GTK: I've had lots of GTK errors thrown (and programs not launch) when trying to run GTK apps on Ubuntu, when the same app works on NixOS. So your OS could be part of the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to look up some example code I had with a python application that did that, but I can't find it right now. Here's it from memory as best as I can...
{..., wrapQtAppsHook}:
buildPythonApplication{
preFixup = ''
for $file in $out/bin/* do
wrapQtApp $file # NOTE: maybe add something like --prefix PYTHONPATH : $out/${python.sitePackages}?? Can't remember...
done
'';
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Result of nixpkgs-review pr 91926 1
Motivation for this change
New release.
In
nixpkgs-review wip
the new package failed to build withpython 2.7
.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)