python3Packages.pyqt5: build using pyproject
Required to use sip 6
This commit is contained in:
parent
7ed55b5ea0
commit
6bea03ffc3
2 changed files with 24 additions and 10 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
let
|
||||
|
||||
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;
|
||||
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34 pyqt-builder;
|
||||
|
||||
sip = if isPy3k then
|
||||
pythonPackages.sip
|
||||
|
@ -48,7 +48,7 @@ let
|
|||
in buildPythonPackage rec {
|
||||
pname = "PyQt5";
|
||||
version = "5.15.2";
|
||||
format = "other";
|
||||
format = if isPy3k then "pyproject" else "other";
|
||||
|
||||
src = pythonPackages.fetchPypi {
|
||||
inherit pname version;
|
||||
|
@ -84,6 +84,7 @@ in buildPythonPackage rec {
|
|||
++ lib.optional withConnectivity qtconnectivity
|
||||
++ lib.optional withWebKit qtwebkit
|
||||
++ lib.optional withWebSockets qtwebsockets
|
||||
++ lib.optional isPy3k pyqt-builder
|
||||
;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -91,7 +92,7 @@ in buildPythonPackage rec {
|
|||
] ++ (if isPy3k then [ pyqt5_sip ] else [ sip enum34 ]);
|
||||
|
||||
patches = [
|
||||
# Fix some wrong assumptions by ./configure.py
|
||||
# Fix some wrong assumptions by ./configure.py and ./project.py
|
||||
# TODO: figure out how to send this upstream
|
||||
./pyqt5-fix-dbus-mainloop-support.patch
|
||||
];
|
||||
|
@ -103,6 +104,9 @@ in buildPythonPackage rec {
|
|||
WebSocketsEnabled = withWebSockets;
|
||||
};
|
||||
|
||||
# Configure only needed when building with sip 4 (python 2)
|
||||
dontConfigure = isPy3k;
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ so I have decided to solve this with an extra configure flag.
|
|||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.py b/configure.py
|
||||
index a3450ca3..440d90a2 100644
|
||||
index c6663e4..65e7da7 100644
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -905,6 +905,9 @@ class TargetConfiguration:
|
||||
|
@ -34,7 +34,7 @@ index a3450ca3..440d90a2 100644
|
|||
if opts.pyuicinterpreter is not None:
|
||||
self.pyuic_interpreter = opts.pyuicinterpreter
|
||||
|
||||
@@ -1184,6 +1187,11 @@ def create_optparser(target_config):
|
||||
@@ -1191,6 +1194,11 @@ def create_optparser(target_config):
|
||||
metavar="DIR",
|
||||
help="the directory containing the dbus/dbus-python.h header is "
|
||||
"DIR [default: supplied by pkg-config]")
|
||||
|
@ -46,7 +46,7 @@ index a3450ca3..440d90a2 100644
|
|||
p.add_option_group(g)
|
||||
|
||||
# Installation.
|
||||
@@ -2149,7 +2157,7 @@ def check_dbus(target_config, verbose):
|
||||
@@ -2277,7 +2285,7 @@ def check_dbus(target_config, verbose):
|
||||
|
||||
inform("Checking to see if the dbus support module should be built...")
|
||||
|
||||
|
@ -55,7 +55,7 @@ index a3450ca3..440d90a2 100644
|
|||
|
||||
if verbose:
|
||||
sys.stdout.write(cmd + "\n")
|
||||
@@ -2178,7 +2186,8 @@ def check_dbus(target_config, verbose):
|
||||
@@ -2307,7 +2315,8 @@ def check_dbus(target_config, verbose):
|
||||
inform("The Python dbus module doesn't seem to be installed.")
|
||||
return
|
||||
|
||||
|
@ -65,6 +65,16 @@ index a3450ca3..440d90a2 100644
|
|||
|
||||
# Try and find dbus-python.h. We don't use pkg-config because it is broken
|
||||
# for dbus-python (at least for versions up to and including v0.81.0).
|
||||
--
|
||||
2.18.0
|
||||
|
||||
diff --git a/project.py b/project.py
|
||||
index fe9fbce..9ae1ca1 100644
|
||||
--- a/project.py
|
||||
+++ b/project.py
|
||||
@@ -261,7 +261,7 @@ del find_qt
|
||||
dbus_lib_dirs = []
|
||||
dbus_libs = []
|
||||
|
||||
- args = ['pkg-config', '--cflags-only-I', '--libs dbus-1']
|
||||
+ args = ['pkg-config', '--cflags-only-I', '--libs dbus-1', 'dbus-python']
|
||||
|
||||
for line in self.read_command_pipe(args, fatal=False):
|
||||
for flag in line.strip().split():
|
||||
|
|
Loading…
Reference in a new issue