Skip to content
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

Merged
merged 1 commit into from Jul 1, 2020

Conversation

jojosch
Copy link
Member

@jojosch jojosch commented Jul 1, 2020

Motivation for this change

New release.

In nixpkgs-review wip the new package failed to build with python 2.7.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
3 packages updated:
jellyfin-mpv-shim python37Packages.pywebview (3.2 → 3.3.1) python38Packages.pywebview (3.2 → 3.3.1)

1 package removed:
python2.7-pywebview (†3.2)
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@drewrisinger drewrisinger left a 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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 of src

Copy link
Member Author

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.

Copy link
Contributor

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).

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.

Copy link
Contributor

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  
  '';
}

Copy link
Contributor

@jonringer jonringer left a 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

31 packages marked as broken and skipped: - digitalbitbox - gdata-sharp - glibcCross - iterm2 - linuxPackages_4_4.evdi - linuxPackages_hardkernel_4_14.bcc - linuxPackages_hardkernel_4_14.bpftrace - linuxPackages_hardkernel_4_14.can-isotp - linuxPackages_hardkernel_4_14.chipsec - linuxPackages_hardkernel_4_14.digimend - linuxPackages_hardkernel_4_14.evdi - linuxPackages_hardkernel_4_14.mba6x_bl - linuxPackages_hardkernel_4_14.nvidia_x11 - linuxPackages_hardkernel_4_14.nvidia_x11_legacy390 - linuxPackages_hardkernel_4_14.nvidiabl - muslCross - newlibCross - php73Packages.phpmd - php74Extensions.pcs - php74Extensions.pthreads - python27Packages.caffe - python27Packages.libmodulemd - python37Packages.nixpart - python37Packages.notify - python37Packages.pyblock - python37Packages.pywick - python38Packages.libselinux - python38Packages.nixpart - python38Packages.notify - python38Packages.pyblock - python38Packages.pywick
3 packages built: - jellyfin-mpv-shim - python37Packages.pywebview - python38Packages.pywebview

@jonringer jonringer merged commit 8c2d5d8 into NixOS:master Jul 1, 2020
@jojosch jojosch deleted the pywebview-3.3.1 branch July 3, 2020 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants