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
pyqt5: make qtwebkit optional, disable by default #51846
Conversation
@GrahamcOfBorg build python27Packages.pyqt5 python37Packages.pyqt5 |
I guess I should not remove QtWebEngine... |
d9d81e5
to
3fe8491
Compare
6edeb89
to
2e48b0f
Compare
This is ready for review now |
2e48b0f
to
80bb03a
Compare
@GrahamcOfBorg build python2Packages.jupyter python3Packages.jupyter |
80bb03a
to
3c749ac
Compare
@GrahamcOfBorg build python2Packages.jupyter python3Packages.jupyter |
* python36Packages.qtconsole: 4.4.2 -> 4.4.3 (#50590) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.6-qtconsole/versions * pythonPackages.qtconsole: linux platforms only
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.
Looks good to me. Do add the comment.
@@ -612,6 +612,7 @@ in { | |||
pyqt5 = pkgs.libsForQt5.callPackage ../development/python-modules/pyqt/5.x.nix { | |||
pythonPackages = self; | |||
}; | |||
pyqt5_with_qtwebkit = self.pyqt5.override { withWebKit = true; }; |
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.
Could you add a comment here explaining that this one should not be used by any Python libraries (so pkgs/development/python-modules/*
) to avoid potential collisions.
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.
There can still be a collision on application level. Should I we move pyqt5_with_qtwebkit
uses from propagatedBuildInputs
to wrappers modifying PYTHONPATH
? Or maybe use python.withPackages
?
6571ce9
to
ebe5104
Compare
Since about 5 hydra evaluations ago the build log has: substituteStream(): WARNING: pattern 'install_dir=pydbusmoddir' doesn't match anything in file 'configure.py' substituteStream(): WARNING: pattern 'ModuleMetadata(qmake_QT=['webkitwidgets'])' doesn't match anything in file 'configure.py' Looking at the original configure.py I don't see any mention of pydbusmoddir and ModuleMetadata seems to be set like the patch suggests: 'QtWebKitWidgets': ModuleMetadata( qmake_QT=['webkitwidgets', 'printsupport']), It appears that we don't need the fix anymore. Reverts: d3ed0ab ('PyQt: fix build')
qtwebkit appears to be unsupported in Qt 5.11. We are using some old port https://github.com/NixOS/nixpkgs/blob/475d653afdbd8fe3e00ccfd22a30014b0df7aeaa/pkgs/development/libraries/qt-5/5.11/default.nix#L39-L48 and it is broken on darwin.
Fixes: d7ef9a7 ('python36Packages.qtconsole: 4.4.2 -> 4.4.3')
From the qutebrowser README: "support for QtWebKit will be dropped soon"
61bffea
to
8df467e
Compare
Having two different version used by libraries is going to cause trouble. Looking at the changeset, they're the webkit one is only used in applications. It may still cause a collision there, but that is easily solvable by overriding the package set. |
It probably should be fine to just use a @FRidh Or you know a better way? |
Introduce a Did you build all applications you've listed? Actually, because there are no libraries depending on the qtwebkit version, that won't be necessary. |
c32138b
to
243be7e
Compare
@FRidh The problem I was talking about was when we do something like:
Then frescobaldi will fail to import QtWebKit because "setupHooks" will override PYTHONPATH with the wrong version of pyqt5. It should not be a problem when using |
@veprbl using |
243be7e
to
16f11df
Compare
Then this should be ready. |
Note Looks good to me. I would like to remove the usage of the qt5webkit asap, e.g. by passing the non-webkit version forcing maintainers to fix their packages. |
QtWebKit is only used if QtWebEngine is not available
149c752
to
eecc336
Compare
Motivation for this change
qtwebkit appears to be unsupported in Qt 5.11. We are using some old port
nixpkgs/pkgs/development/libraries/qt-5/5.11/default.nix
Lines 39 to 48 in 475d653
and it is broken on darwin. We are likely will be looking to be phasing out QtWebKit in the future as it will break and have more and more security problems. It is nice to have packages that still rely on it to be marked out.
Things done
sandbox
innix.conf
on non-NixOS)nix-review pr 51846
./result/bin/
)grep -r QtWebKit ...
and try to run the binary)electron-cash - was broken on Hydra due to cytoolz, setup-release.py says it needs PyQt5.QtWebKitdoesn't need QtWebKitimports QtWebKitWidgetsimports QtWebKitWidgets, but only if QtWebEngine is not available