Skip to content

python.pkgs.pyqt5: 5.11.3 -> 5.12 - #56354

Closed
dotlambda wants to merge 4 commits into
NixOS:masterfrom
dotlambda:pyqt-5.12
Closed

dotlambda wants to merge 4 commits into
NixOS:masterfrom
dotlambda:pyqt-5.12

Conversation

@dotlambda

Copy link
Copy Markdown
Member
Motivation for this change

#56349 (comment)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@dotlambda

Copy link
Copy Markdown
Member Author

Not yet ready for merge. I still have to investigate why running qutebrowser yields

qutebrowser needs QtWebKit or QtWebEngine, but neither could be imported!
The errors encountered were:
QtWebKit: cannot import name 'QtWebKit' from 'PyQt5' (/nix/store/5prasyaxrbcy43rdyq0zydgc1ap2l8dl-python3.7-pyqt-5.12/lib/python3.7/site-packages/PyQt5/__init__.py)
QtWebEngine: cannot import name 'QtWebEngineWidgets' from 'PyQt5' (/nix/store/5prasyaxrbcy43rdyq0zydgc1ap2l8dl-python3.7-pyqt-5.12/lib/python3.7/site-packages/PyQt5/__init__.py)

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: python Python is a high-level, general-purpose programming language. label Feb 25, 2019
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Feb 25, 2019
@dotlambda

Copy link
Copy Markdown
Member Author

According to https://www.riverbankcomputing.com/news/pyqt-512, "the QtWebEngine, QtWebEngineCore and QtWebEngineWidgets modules have been moved to a separate PyQtWebEngine package." I'm currently packaging that one.

@dotlambda

dotlambda commented Feb 25, 2019 •

Copy link
Copy Markdown
Member Author

Now I'm getting

Fatal error: PyQt5.QtQml is required to run qutebrowser but could not be imported! Maybe it's not installed?

The error encountered was:
No module named 'PyQt5.QtQml'

Please search for the python3 version of PyQt5.QtQml in your distributions packages, or see https://github.com/qutebrowser/qutebrowser/blob/master/doc/install.asciidoc

That's still true when merging #56349.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I really don't see any configure option to fix this :(

@GrahamcOfBorg GrahamcOfBorg added the 8.has: package (new) This PR adds a new package label Feb 25, 2019
@FRidh FRidh added this to the 19.09 milestone Apr 28, 2019
@FRidh

FRidh commented May 12, 2019

Copy link
Copy Markdown
Member

Could you rebase?

@dotlambda

Copy link
Copy Markdown
Member Author

Done. Note there's a new version out. However, I currently don't have time to look into this any further or work on nixpkgs at all.

@cizra

cizra commented May 16, 2019

Copy link
Copy Markdown
Contributor

Build fails for me:

$ nix-build -A qutebrowser
these derivations will be built:
  /nix/store/hcddpixnf5r6nd5acy5b1n28v71kvsha-python3.7-pyqtwebengine-5.12.1.drv
  /nix/store/aaxagq1g99520rvspgdfa5qbcx8ihhn0-qutebrowser-1.6.2.drv
building '/nix/store/hcddpixnf5r6nd5acy5b1n28v71kvsha-python3.7-pyqtwebengine-5.12.1.drv'...
unpacking sources
unpacking source archive /nix/store/bqzynfhf1d6in4cdb1bc7ni9qi74j399-PyQtWebEngine_gpl-5.12.1.tar.gz
source root is PyQtWebEngine_gpl-5.12.1
setting SOURCE_DATE_EPOCH to timestamp 1553006662 of file PyQtWebEngine_gpl-5.12.1/sip/QtWebEngineWidgets/qwebengineview.sip
patching sources
configuring
Error: Make sure you have a working sip on your PATH or use the --sip argument
to explicitly specify a working sip.
builder for '/nix/store/hcddpixnf5r6nd5acy5b1n28v71kvsha-python3.7-pyqtwebengine-5.12.1.drv' failed with exit code 1
cannot build derivation '/nix/store/aaxagq1g99520rvspgdfa5qbcx8ihhn0-qutebrowser-1.6.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/aaxagq1g99520rvspgdfa5qbcx8ihhn0-qutebrowser-1.6.2.drv' failed

format = "other";

src = fetchurl {
url = "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/PyQtWebEngine_gpl-${version}.tar.gz";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nix-prefetch-url "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/PyQtWebEngine_gpl-5.12.tar.gz"        
[0.0 MiB DL]
error: unable to download 'https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/PyQtWebEngine_gpl-5.12.tar.gz': HTTP error 404
Suggested change
url = "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/PyQtWebEngine_gpl-${version}.tar.gz";
url = "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/${version}/PyQtWebEngine_gpl-${version}.tar.gz";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That, and version 5.12 doesn't exist anymore — you need 5.12.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It does:

nix-prefetch-url https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/5.12/PyQtWebEngine_gpl-5.12.tar.gz
[0.0 MiB DL]
path is '/nix/store/8wdwbx0vir0jkyfv4cnry1x1p1pd4625-PyQtWebEngine_gpl-5.12.tar.gz'
0j9zzgwrvh61mrzjfcdlhr08vg931ycb53ri51vynsj0grp07smn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hah, the lack of version in path, compounded by the availability of the new version, tripped me up.

pname = "PyQt";
version = "5.11.3";
pname = "pyqt";
version = "5.12";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
version = "5.12";
version = "5.12.1";

@tadeokondrak

Copy link
Copy Markdown
Contributor

Now I'm getting
Fatal error: PyQt5.QtQml is required to run qutebrowser but could not be imported! Maybe it's not installed?

This can probably be fixed by adding more options into pkgs/development/python-modules/pyqt/5.x.nix. It depends on qtbase, but not qtdeclarative.

@ghost

ghost commented Jun 20, 2019

Copy link
Copy Markdown

So I tried to contiue this by updating pyqt to 5.12.2 and pyqtwebengine to 5.12.1 since old versions are not available anymore. I can not make pyqtwebengine compile:
mkdir: cannot create directory \u2018/nix/store/4c4ajgdnhlqk994hilagk5cgv7vw9yzg-python3-3.7.3/lib/python3.7/site-packages/PyQt5\u2019: Permission denied
I've had some really annoying bugs in qutebrowser lately, which is why I really want this update, so I can see if the mismatched pyqt version is at fault.

@worldofpeace worldofpeace mentioned this pull request Jul 23, 2019
4 of 10 tasks
@FRidh

FRidh commented Aug 3, 2019

Copy link
Copy Markdown
Member

I'm taking this further in #65836.

@FRidh FRidh closed this Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants