[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] qmake variables support in PyQtWebEngine et al
From:       Dmitry Shachnev <mitya57 () ubuntu ! com>
Date:       2019-03-07 18:24:15
Message-ID: 20190307182415.GA2553 () mitya57 ! me
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi Phil!

PyQt's configure.py allows you to pass name=value or name+=value pairs as
command line arguments, and they will be written into generated .pro files.

However PyQtWebEngine (and I believe also QScintilla and other modules using
the same boilerplate) does not accept such pairs, which makes it inconvenient
for us in Debian (my use case is passing QMAKE_CXXFLAGS and QMAKE_LFLAGS).

It would be nice if you added such support. A very basic patch is attached.

--
Dmitry Shachnev

["qmake_flags.diff" (text/x-diff)]

From: Dmitry Shachnev <mitya57@debian.org>
Date: Thu, 7 Mar 2019 16:15:20 +0300
Subject: Add support for qmake flags to configure.py

---
 configure.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/configure.py b/configure.py
index e811e87..4060078 100644
--- a/configure.py
+++ b/configure.py
@@ -770,6 +770,7 @@ class _TargetConfiguration:
         self.pyqt_version_str = ''
         self.qmake = self._find_exe('qmake')
         self.qmake_spec = ''
+        self.qmake_variables = []
         self.qt_version = 0
         self.qt_version_str = ''
         self.sip = self._find_exe('sip5', 'sip')
@@ -1664,6 +1665,7 @@ macx {
             pro.write(' \\\n    %s' % s)
     pro.write('\n')
 
+    pro.write('\n'.join(target_config.qmake_variables) + '\n')
     pro.close()
 
 
@@ -1821,11 +1823,7 @@ def _main(argv, pkg_config):
 
     # Parse the command line.
     p = _create_optparser(target_config, pkg_config)
-    opts, args = p.parse_args()
-
-    if args:
-        p.print_help()
-        sys.exit(2)
+    opts, target_config.qmake_variables = p.parse_args()
 
     target_config.apply_pre_options(opts)
 

["signature.asc" (application/pgp-signature)]
[Attachment #9 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic