Merge pull request #51846 from veprbl/pr/pyqt5_opt_qtwebkit

pyqt5: make qtwebkit optional, disable by default
This commit is contained in:
Frederik Rietdijk 2018-12-30 16:34:39 +01:00 committed by GitHub
commit 26e5c0f07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 36 deletions

View File

@ -25,7 +25,7 @@
DESTDIR=$(out)
'';
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
postInstall = ''
# replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
prePatch = ''
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':" \
setup/build_environment.py
# Remove unneeded files and libs
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
] ++ (with python2Packages; [
apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
python pyqt5 sip
python pyqt5_with_qtwebkit sip
regex msgpack
# the following are distributed with calibre, but we use upstream instead
odfpy

View File

@ -4,7 +4,6 @@
, libxslt, gst_all_1 ? null
, withPdfReader ? true
, withMediaPlayback ? true
, withWebEngineDefault ? true
}:
assert withMediaPlayback -> gst_all_1 != null;
@ -39,7 +38,7 @@ in python3Packages.buildPythonApplication rec {
] ++ lib.optionals withMediaPlayback (with gst_all_1; [
gst-plugins-base gst-plugins-good
gst-plugins-bad gst-plugins-ugly gst-libav
]) ++ lib.optional (!withWebEngineDefault) python3Packages.qtwebkit-plugins;
]);
nativeBuildInputs = [
makeWrapper wrapGAppsHook asciidoc
@ -90,10 +89,6 @@ in python3Packages.buildPythonApplication rec {
done
'';
postFixup = lib.optionalString (! withWebEngineDefault) ''
wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit"
'';
meta = with stdenv.lib; {
homepage = https://github.com/The-Compiler/qutebrowser;
description = "Keyboard-focused browser with a minimal GUI";

View File

@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
'';
propagatedBuildInputs = with pythonPackages; [ pyqt5 cjson sipsimple twisted google_api_python_client ];
propagatedBuildInputs = with pythonPackages; [ pyqt5_with_qtwebkit cjson sipsimple twisted google_api_python_client ];
buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ];

View File

@ -9,7 +9,7 @@ in python3Packages.buildPythonPackage {
sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22";
};
propagatedBuildInputs = with python3Packages; [ pyqt5 dbus-python jsmin ];
propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ];
meta = with stdenv.lib; {
description = "Non-official desktop client for Slack";

View File

@ -2,6 +2,7 @@
let
inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify;
in buildPythonApplication rec {
name = "git-cola-${version}";
version = "3.2";

View File

@ -17,7 +17,7 @@ python3Packages.buildPythonApplication rec {
buildInputs = [ gtk3 ];
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5 requests sip httplib2 pyzmq ];
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ];
preConfigure = ''

View File

@ -1,30 +1,21 @@
{ lib, fetchurl, fetchpatch, pythonPackages, pkgconfig
, qmake, lndir, qtbase, qtsvg, qtwebkit, qtwebengine, dbus
, withWebSockets ? false, qtwebsockets
, qmake, lndir, qtbase, qtsvg, qtwebengine, dbus
, withConnectivity ? false, qtconnectivity
, withWebKit ? false, qtwebkit
, withWebSockets ? false, qtwebsockets
}:
let
pname = "PyQt";
version = "5.11.3";
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;
sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; };
in buildPythonPackage {
pname = pname;
version = version;
in buildPythonPackage rec {
pname = "PyQt";
version = "5.11.3";
format = "other";
meta = with lib; {
description = "Python bindings for Qt5";
homepage = http://www.riverbankcomputing.co.uk;
license = licenses.gpl3;
platforms = platforms.mesaPlatforms;
maintainers = with maintainers; [ sander ];
};
src = fetchurl {
url = "mirror://sourceforge/pyqt/PyQt5/PyQt-${version}/PyQt5_gpl-${version}.tar.gz";
sha256 = "0wqh4srqkcc03rvkwrcshaa028psrq58xkys6npnyhqxc0apvdf9";
@ -36,9 +27,11 @@ in buildPythonPackage {
buildInputs = [ dbus sip ];
propagatedBuildInputs = [
qtbase qtsvg qtwebkit qtwebengine
] ++ lib.optional (!isPy3k) enum34 ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withConnectivity qtconnectivity;
propagatedBuildInputs = [ qtbase qtsvg qtwebengine ]
++ lib.optional (!isPy3k) enum34
++ lib.optional withConnectivity qtconnectivity
++ lib.optional withWebKit qtwebkit
++ lib.optional withWebSockets qtwebsockets;
configurePhase = ''
runHook preConfigure
@ -49,10 +42,6 @@ in buildPythonPackage {
export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
substituteInPlace configure.py \
--replace 'install_dir=pydbusmoddir' "install_dir='$out/${python.sitePackages}/dbus/mainloop'" \
--replace "ModuleMetadata(qmake_QT=['webkitwidgets'])" "ModuleMetadata(qmake_QT=['webkitwidgets', 'printsupport'])"
${python.executable} configure.py -w \
--confirm-license \
--dbus=${dbus.dev}/include/dbus-1.0 \
@ -74,4 +63,12 @@ in buildPythonPackage {
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Python bindings for Qt5";
homepage = http://www.riverbankcomputing.co.uk;
license = licenses.gpl3;
platforms = platforms.mesaPlatforms;
maintainers = with maintainers; [ sander ];
};
}

View File

@ -31,7 +31,7 @@ buildPythonPackage rec {
description = "Jupyter Qt console";
homepage = http://jupyter.org/;
license = lib.licenses.bsd3;
platforms = lib.platforms.linux; # fails on Darwin
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ fridh ];
};
}

View File

@ -11,7 +11,10 @@ python3Packages.buildPythonApplication rec {
sha256 = "1yn18pwsjxpxz5j3yfysmaif8k0vqahj5c7ays9cxsylpg9hl7jd";
};
propagatedBuildInputs = with python3Packages; [ lilypond pygame python-ly poppler-qt5 ];
propagatedBuildInputs = with python3Packages; [
lilypond pygame python-ly sip
pyqt5_with_qtwebkit (poppler-qt5.override { pyqt5 = pyqt5_with_qtwebkit; })
];
# no tests in shipped with upstream
doCheck = false;

View File

@ -615,6 +615,13 @@ in {
pythonPackages = self;
};
/*
`pyqt5_with_qtwebkit` should not be used by python libraries in
pkgs/development/python-modules/*. Putting this attribute in
`propagatedBuildInputs` may cause collisions.
*/
pyqt5_with_qtwebkit = self.pyqt5.override { withWebKit = true; };
pysc2 = callPackage ../development/python-modules/pysc2 { };
pyscard = callPackage ../development/python-modules/pyscard { inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; };