3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyqt/5.x.nix
Dmitry Kalinkin 9b07d48d9c
pyqt5: remove old fixes
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: d3ed0ab32b ('PyQt: fix build')
2018-12-27 09:13:07 -05:00

74 lines
2 KiB
Nix

{ lib, fetchurl, fetchpatch, pythonPackages, pkgconfig
, qmake, lndir, qtbase, qtsvg, qtwebkit, qtwebengine, dbus
, withWebSockets ? false, qtwebsockets
, withConnectivity ? false, qtconnectivity
}:
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;
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";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkgconfig qmake lndir ];
buildInputs = [ dbus sip ];
propagatedBuildInputs = [
qtbase qtsvg qtwebkit qtwebengine
] ++ lib.optional (!isPy3k) enum34 ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withConnectivity qtconnectivity;
configurePhase = ''
runHook preConfigure
mkdir -p $out
lndir ${dbus-python} $out
rm -rf "$out/nix-support"
export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
${python.executable} configure.py -w \
--confirm-license \
--dbus=${dbus.dev}/include/dbus-1.0 \
--no-qml-plugin \
--bindir=$out/bin \
--destdir=$out/${python.sitePackages} \
--stubsdir=$out/${python.sitePackages}/PyQt5 \
--sipdir=$out/share/sip/PyQt5 \
--designer-plugindir=$out/plugins/designer
runHook postConfigure
'';
postInstall = ''
ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/
for i in $out/bin/*; do
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
done
'';
enableParallelBuilding = true;
}