Skip to content

calibre: build with py3 by default#97270

Merged
peterhoeg merged 2 commits intoNixOS:masterfrom
peterhoeg:f/calibre_py3
Sep 7, 2020
Merged

calibre: build with py3 by default#97270
peterhoeg merged 2 commits intoNixOS:masterfrom
peterhoeg:f/calibre_py3

Conversation

@peterhoeg
Copy link
Member

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

Cc @domenkozar @pSub @AndersonTorres

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Sep 6, 2020
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Sep 6, 2020
@peterhoeg
Copy link
Member Author

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

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.

otherwise LGTM


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

calibre = calibre-py3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it can make a difference with overlays

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

Copy link
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

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."]

Copy link
Contributor

Choose a reason for hiding this comment

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

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

@peterhoeg peterhoeg merged commit 745d47e into NixOS:master Sep 7, 2020
@peterhoeg peterhoeg deleted the f/calibre_py3 branch September 7, 2020 04:50
@obadz
Copy link
Contributor

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
Contributor

mtreca commented Sep 16, 2020

See #98067

@Galagora Galagora mentioned this pull request Sep 16, 2020
10 tasks
@peterhoeg
Copy link
Member Author

Should be fixed by #98197.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants