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

calibre: build with py3 by default #97270

Merged
merged 2 commits into from Sep 7, 2020
Merged

Conversation

@peterhoeg
Copy link
Member

@peterhoeg peterhoeg commented Sep 6, 2020

Motivation for this change

python 2 is dead and calibre has been supporting py3 for a while now.

In case people still need py2 due to external plugins not supporting py3
yet, we have calibre-py2.

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"
  • 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.
@peterhoeg
Copy link
Member Author

@peterhoeg peterhoeg commented Sep 6, 2020

@peterhoeg
Copy link
Member Author

@peterhoeg peterhoeg commented Sep 6, 2020

We probably want this in 20.09 @jonringer due to the py2 -> py3 move.

Copy link
Contributor

@jonringer jonringer left a comment

otherwise LGTM


calibre-py3 = libsForQt5.callPackage ../applications/misc/calibre { pythonPackages = python3Packages; };

calibre = calibre-py3;

This comment has been minimized.

@jonringer

jonringer Sep 6, 2020
Contributor

I believe it can make a difference with overlays

Suggested change
calibre = calibre-py3;
calibre = self.calibre-py3;

This comment has been minimized.

@peterhoeg

peterhoeg Sep 7, 2020
Author Member

I'll take your word for it. Fixed! Bumped the version while at it. Works here.

This comment has been minimized.

@peterhoeg

peterhoeg Sep 7, 2020
Author Member

So grahamcofborg begs to differ:

nix-env did not evaluate cleanly:
 ["trace: It seems that you are using a patched Nixpkgs that references the self", "variable in pkgs/top-level/all-packages.nix. This variable was incorrectly", "named, so its usage needs attention. Please use pkgs for packages or super", "for functions.", "trace: It seems that you are using a patched Nixpkgs that references the self", "variable in pkgs/top-level/all-packages.nix. This variable was incorrectly", "named, so its usage needs attention. Please use pkgs for packages or super", "for functions.", "trace: It seems that you are using a patched Nixpkgs that references the self", "variable in pkgs/top-level/all-packages.nix. This variable was incorrectly", "named, so its usage needs attention. Please use pkgs for packages or super", "for functions.", "trace: It seems that you are using a patched Nixpkgs that references the self", "variable in pkgs/top-level/all-packages.nix. This variable was incorrectly", "named, so its usage needs attention. Please use pkgs for packages or super", "for functions."]

This comment has been minimized.

@jonringer

jonringer Sep 7, 2020
Contributor

interesting, not what I was expecting, as this works in python packages.

@peterhoeg peterhoeg force-pushed the peterhoeg:f/calibre_py3 branch from 31f6067 to 4b25b12 Sep 7, 2020
@peterhoeg peterhoeg merged commit 745d47e into NixOS:master Sep 7, 2020
2 of 3 checks passed
2 of 3 checks passed
tests tests
Details
action
Details
Wait for ofborg This failed status will be cleared when ofborg finishes eval.
Details
@peterhoeg peterhoeg deleted the peterhoeg:f/calibre_py3 branch Sep 7, 2020
@obadz
Copy link
Contributor

@obadz obadz commented Sep 16, 2020

Can no longer use calibre without reverting
3690d1d :

$ ebook-viewer 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

(Same error for both py2 and -py3)

Repro: nix-shell --pure -p calibre --command ebook-viewer

@mtreca
Copy link

@mtreca mtreca commented Sep 16, 2020

See #98067

@galagora galagora mentioned this pull request Sep 16, 2020
6 of 10 tasks complete
@peterhoeg
Copy link
Member Author

@peterhoeg peterhoeg commented Sep 25, 2020

Should be fixed by #98197.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.