Skip to contentSkip to conversation

PyQt5 package

PATCH New Manuel Vögele 3 participants 11 messages Aug 19, 2016 – Sep 27, 2016

lore
Share & tools
lore
#0 lore raw

cover PyQt5 package

This package contains Python bindings for Qt5. Since PyQt4 and PyQt5 are similar in many ways most of the package configuration is taken directly from the python-pyqt package and altered to fit PyQt5.

Manuel V?gele (2):
python-sip: allow package to be built using Qt5
python-pyqt5: new package

 package/Config.in                                  |  1 +
 .../0001-configure-skip-qtdetail.patch             | 29 +++++++
 package/python-pyqt5/Config.in                     | 23 ++++++
 package/python-pyqt5/python-pyqt5.hash             |  3 +
 package/python-pyqt5/python-pyqt5.mk               | 88 ++++++++++++++++++++++
 package/python-sip/Config.in                       |  7 +-
 package/python-sip/python-sip.mk                   |  4 +
 7 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100644 package/python-pyqt5/0001-configure-skip-qtdetail.patch
 create mode 100644 package/python-pyqt5/Config.in
 create mode 100644 package/python-pyqt5/python-pyqt5.hash
 create mode 100644 package/python-pyqt5/python-pyqt5.mk
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/2 python-sip: allow package to be built using Qt5

---
 package/python-sip/Config.in     | 7 ++++++-
 package/python-sip/python-sip.mk | 4 ++++
 2 files changed, 10 insertions(+), 1 deletion(-)
package/python-sip/Config.in +6 -1
index 45e48ad..1f8961d 100644
@@ -2,12 +2,17 @@ comment "python-sip needs a toolchain w/ C++, threads"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
 
+comment "python-sip needs qt or qt5"
+	depends on BR2_USE_MMU
+	depends on BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+
 config BR2_PACKAGE_PYTHON_SIP
 	bool "python-sip"
 	depends on BR2_INSTALL_LIBSTDCPP # qt
 	depends on BR2_TOOLCHAIN_HAS_THREADS # qt
 	depends on BR2_USE_MMU # qt
-	select BR2_PACKAGE_QT
+	depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
 	help
 	  SIP is a tool that makes it very easy to create Python
 	  bindings for C and C++ libraries. It was originally
package/python-sip/python-sip.mk +4 -0
index d13801f..0c0a947 100644
@@ -10,7 +10,11 @@ PYTHON_SIP_SITE = http://downloads.sourceforge.net/project/pyqt/sip/sip-$(PYTHON
 PYTHON_SIP_LICENSE = SIP license or GPLv2 or GPLv3
 PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3
 
+ifeq ($(BR2_PACKAGE_QT5),y)
+PYTHON_SIP_DEPENDENCIES = qt5base
+else
 PYTHON_SIP_DEPENDENCIES = qt
+endif
 
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 PYTHON_SIP_DEPENDENCIES += python
Signature · 1 line
2.1.4
#3 lore raw

PATCH 2/2 python-pyqt5: new package

In reply to Manuel Vögele
---
 package/Config.in                                  |  1 +
 .../0001-configure-skip-qtdetail.patch             | 29 +++++++
 package/python-pyqt5/Config.in                     | 23 ++++++
 package/python-pyqt5/python-pyqt5.hash             |  3 +
 package/python-pyqt5/python-pyqt5.mk               | 88 ++++++++++++++++++++++
 5 files changed, 144 insertions(+)
 create mode 100644 package/python-pyqt5/0001-configure-skip-qtdetail.patch
 create mode 100644 package/python-pyqt5/Config.in
 create mode 100644 package/python-pyqt5/python-pyqt5.hash
 create mode 100644 package/python-pyqt5/python-pyqt5.mk
package/Config.in +1 -0
index 1e51a45..c4b4ed1 100644
@@ -734,6 +734,7 @@ menu "External python modules"
 	source "package/python-pyparted/Config.in"
 	source "package/python-pypcap/Config.in"
 	source "package/python-pyqt/Config.in"
+	source "package/python-pyqt5/Config.in"
 	source "package/python-pyratemp/Config.in"
 	source "package/python-pyro/Config.in"
 	source "package/python-pyroute2/Config.in"
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +29 -0
new file mode 100644
index 0000000..2e7b331
@@ -0,0 +1,29 @@
+Do not run qtdetail
+
+qtdetail is a tool that generates qtdetail.out. Since this program is
+cross-compiled, it's not possible to run it on the host.
+
+Consequently, python-pyqt5.mk generates the qtdetail.out file before
+calling configure.py.
+
+Therefore, this patch makes sure that the pre-generated qtdetail.out
+file is kept, and that qtdetail is not executed.
+
+Signed-off-by: Gwenhael Goavec-Merou <[email protected]>
+Signed-off-by: Sergey Kostanbaev <[email protected]>
+---
+Index: PyQt5_gpl-5.7/configure.py
+===================================================================
+--- PyQt5_gpl-5.7.orig/configure.py
++++ PyQt5_gpl-5.7/configure.py
+@@ -672,10 +672,6 @@ int main(int argc, char **argv)
+         if cmd is None:
+             error("Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.")
+ 
+-        # Create the output file, first making sure it doesn't exist.
+-        remove_file(out_file)
+-        run_command(cmd, verbose)
+-
+         if not os.access(out_file, os.F_OK):
+             error("%s failed to create %s. Make sure your Qt installation is correct." % (cmd, out_file))
+ 
package/python-pyqt5/Config.in new file +23 -0
new file mode 100644
index 0000000..6dcdd84
@@ -0,0 +1,23 @@
+comment "python-pyqt5 needs a toolchain w/ C++, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_PYTHON_PYQT5
+	bool "python-pyqt5"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS # qt
+	depends on BR2_USE_MMU # qt
+	select BR2_PACKAGE_QT5
+	select BR2_PACKAGE_PYTHON_SIP
+	help
+	  PyQt4 for Qt Embedded 4 bindings.
+
+	  http://www.riverbankcomputing.com/software/pyqt/
+
+if BR2_PACKAGE_PYTHON_PYQT5
+
+config BR2_PACKAGE_PYTHON_PYQT5_ARCH_USES_QREAL_FLOAT
+	bool
+	default y if BR2_arm || BR2_armeb
+	default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb
+endif
package/python-pyqt5/python-pyqt5.hash new file +3 -0
new file mode 100644
index 0000000..2a7d05b
@@ -0,0 +1,3 @@
+# md5 from http://http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7, sha256 locally computed
+md5	e3dc21f31fd714659f0688e1eb31bacf  PyQt5_gpl-5.7.tar.gz
+sha256	892693ba5f79989abb2061dad2d5c4e6f127e9dd3240f73f8220c7152cd35b05  PyQt5_gpl-5.7.tar.gz
package/python-pyqt5/python-pyqt5.mk new file +88 -0

88 lines not on this page · raw message

Signature · 1 line
2.1.4
#2 lore raw

PATCH 1/2 python-sip: allow package to be built using Qt5

In reply to Manuel Vögele

Hello,

Quoted 5 lines · Manuel V?gele
---
 package/python-sip/Config.in     | 7 ++++++-
 package/python-sip/python-sip.mk | 4 ++++
 2 files changed, 10 insertions(+), 1 deletion(-)

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 2/2 python-pyqt5: new package

In reply to Manuel Vögele

Hello,

Thanks for this contribution!

First question: this package seems to really be an adapted copy/paste from python-pyqt. Have you double checked that all aspects of python-pyqt.mk are also needed for the Qt5 version? I'm especially thinking about all the qtdetail related tricks.

Quoted 9 lines · Manuel V?gele
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +3 -0
new file mode 100644
index 0000000..2e7b331
@@ -0,0 +1,29 @@
+Do not run qtdetail
+
+qtdetail is a tool that generates qtdetail.out. Since this program is

package/python-pyqt5/0001-configure-skip-qtdetail.patch line 13

Quoted 10 lines
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +10 -0
+cross-compiled, it's not possible to run it on the host.
+
+Consequently, python-pyqt5.mk generates the qtdetail.out file before
+calling configure.py.
+
+Therefore, this patch makes sure that the pre-generated qtdetail.out
+file is kept, and that qtdetail is not executed.
+
+Signed-off-by: Gwenhael Goavec-Merou <[email protected]>
+Signed-off-by: Sergey Kostanbaev <[email protected]>

Since I guess PyQt5 is managed in Git upstream, I would very much prefer a Git formatted patch if possible. Of course, if Git is not used upstream, then it's fine.

Quoted 6 lines
package/python-pyqt5/Config.in new file +0 -0
new file mode 100644
index 0000000..6dcdd84

package/python-pyqt5/Config.in line 9

Quoted 9 lines
package/python-pyqt5/Config.in new file +9 -0
@@ -0,0 +1,23 @@
+comment "python-pyqt5 needs a toolchain w/ C++, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_PYTHON_PYQT5
+	bool "python-pyqt5"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS # qt
+	depends on BR2_USE_MMU # qt

These "depends on" are the one from qt. You need to use the ones from "qt5", i.e:

depends on BR2_INSTALL_LIBSTDCPP # qt5 depends on BR2_USE_WCHAR # qt5
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # qt5 depends on !BR2_STATIC_LIBS # qt5 depends on !BR2_PACKAGE_QT # qt5

and obviously adjust the comment above accordingly.

package/python-pyqt5/Config.in line 13

Quoted 4 lines
package/python-pyqt5/Config.in new file +4 -0
+	select BR2_PACKAGE_QT5
+	select BR2_PACKAGE_PYTHON_SIP
+	help
+	  PyQt4 for Qt Embedded 4 bindings.

Really PyQt4 ?

package/python-pyqt5/Config.in line 22

Quoted 8 lines
package/python-pyqt5/Config.in new file +8 -0
+	  http://www.riverbankcomputing.com/software/pyqt/
+
+if BR2_PACKAGE_PYTHON_PYQT5
+
+config BR2_PACKAGE_PYTHON_PYQT5_ARCH_USES_QREAL_FLOAT
+	bool
+	default y if BR2_arm || BR2_armeb
+	default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb

An empty new line here would be good.

Is this thing still needed for PyQt5 ?

Quoted 22 lines
package/python-pyqt5/Config.in new file +20 -0
+endif
 
 
+PYTHON_PYQT5_QTDETAIL_LICENSE = Open Source
+
+PYTHON_PYQT5_QTDETAIL_TYPE = shared
+
+# Turn off features that aren't available in current qt configuration
+
+PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if $(BR2_PACKAGE_OPENSSL),,PyQt_SSL)
+PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if $(BR2_PACKAGE_QT5BASE_OPENGL),,PyQt_OpenGL)
+
+# PyQt_qreal_double must be disabled on a number of architectures that
+# use float for qreal.
+ifeq ($(BR2_PACKAGE_PYTHON_PYQT5_ARCH_USES_QREAL_FLOAT),y)
+PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double
+endif
+
+define PYTHON_PYQT5_QTDETAIL
+	echo $(1) >> $(2)/qtdetail.out
+endef
+

package/python-pyqt5/Config.in

Quoted 10 lines
package/python-pyqt5/Config.in new file +10 -0
+# Since we can't run generate qtdetail.out by running qtdetail on target device
+# we must generate the configuration.
+define PYTHON_PYQT5_GENERATE_QTDETAIL
+	$(RM) -f $(1)/qtdetail.out
+	$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_LICENSE),$(1))
+	$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_TYPE),$(1))
+	$(foreach f,$(PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES),
+		$(call PYTHON_PYQT5_QTDETAIL,$(f),$(1)) \
+	)
+endef

So this is all exactly the same as PyQt4 ?

package/python-pyqt5/Config.in

Quoted 9 lines
package/python-pyqt5/Config.in new file +9 -0
+# __init__.py is needed to import PyQt5
+# __init__.pyc is needed if BR2_PACKAGE_PYTHON_PYC_ONLY is set
+define PYTHON_PYQT5_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install
+	touch $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5/__init__.py
+	$(RM) -rf $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5/uic/$(PYTHON_PYQT5_RM_PORT_BASE)
+	PYTHONPATH="$(PYTHON_PATH)" \
+		$(HOST_DIR)/usr/bin/python -c "import compileall; \
+		compileall.compile_dir('$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5')"

Can you test after removing this compileall line? Indeed, we are now byte-compiling all Python modules globally. If it works, a patch removing this line for python-pyqt.mk would be good to have.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

PATCH 2/2 python-pyqt5: new package

Hello,

thanks for your review.

Quoted 17 lines
Quoted 17 lines
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +10 -0
new file mode 100644
index 0000000..2e7b331
@@ -0,0 +1,29 @@
+Do not run qtdetail
+
+qtdetail is a tool that generates qtdetail.out. Since this program is
+cross-compiled, it's not possible to run it on the host.
+
+Consequently, python-pyqt5.mk generates the qtdetail.out file before
+calling configure.py.
+
+Therefore, this patch makes sure that the pre-generated qtdetail.out
+file is kept, and that qtdetail is not executed.
Quoted 8 lines
Quoted 4 lines
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +2 -0
+
+Signed-off-by: Gwenhael Goavec-Merou 

<[email protected]> +Signed-off-by: Sergey Kostanbaev <[email protected]>

Since I guess PyQt5 is managed in Git upstream, I would very much prefer a Git formatted patch if possible. Of course, if Git is not used upstream, then it's fine.

I didn't manage to find any official PyQt repository. But if it exists I suppose it would be a Mercurial repo since all the other Riverbank projects use Mercurial too.

Quoted 27 lines
Quoted 27 lines
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +7 -0
+PYTHON_PYQT5_QTDETAIL_LICENSE = Open Source
+
+PYTHON_PYQT5_QTDETAIL_TYPE = shared
+
+# Turn off features that aren't available in current qt configuration
+
+PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if 

$(BR2_PACKAGE_OPENSSL),,PyQt_SSL)
+PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if
$(BR2_PACKAGE_QT5BASE_OPENGL),,PyQt_OpenGL)

package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +2 -0
+
+# PyQt_qreal_double must be disabled on a number of architectures 

that

package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +10 -0
+# use float for qreal.
+ifeq ($(BR2_PACKAGE_PYTHON_PYQT5_ARCH_USES_QREAL_FLOAT),y)
+PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double
+endif
+
+define PYTHON_PYQT5_QTDETAIL
+	echo $(1) >> $(2)/qtdetail.out
+endef
+
+# Since we can't run generate qtdetail.out by running qtdetail on 

target device

package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +3 -0
+# we must generate the configuration.
+define PYTHON_PYQT5_GENERATE_QTDETAIL
+	$(RM) -f $(1)/qtdetail.out
Quoted 8 lines

package/python-pyqt5/0001-configure-skip-qtdetail.patch

Quoted 6 lines
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +6 -0
+	$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_LICENSE),$(1))
+	$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_TYPE),$(1))
+	$(foreach f,$(PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES),
+		$(call PYTHON_PYQT5_QTDETAIL,$(f),$(1)) \
+	)
+endef

So this is all exactly the same as PyQt4 ?

It's not all the same - I already removed some switches which aren't required in PyQt5. But I'm gonna recheck if I can remove even more.

Quoted 7 lines
Quoted 7 lines
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +5 -0
+# __init__.py is needed to import PyQt5
+# __init__.pyc is needed if BR2_PACKAGE_PYTHON_PYC_ONLY is set
+define PYTHON_PYQT5_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install
+	touch 

$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5/__init__.py

package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +1 -0
+	$(RM) -rf 
Quoted 8 lines

package/python-pyqt5/0001-configure-skip-qtdetail.patch

Quoted 4 lines

$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5/uic/$(PYTHON_PYQT5_RM_PORT_BASE)

package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +3 -0
+	PYTHONPATH="$(PYTHON_PATH)" \
+		$(HOST_DIR)/usr/bin/python -c "import compileall; \
+		compileall.compile_dir('$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5')"

Can you test after removing this compileall line? Indeed, we are now byte-compiling all Python modules globally. If it works, a patch removing this line for python-pyqt.mk would be good to have.

I'm gonna do that.

Thanks for you review
Manuel

#6 lore raw

PATCH 2/2 python-pyqt5: new package

Hello,

Quoted 7 lines · Manuel V?gele
Quoted 3 lines

Since I guess PyQt5 is managed in Git upstream, I would very much prefer a Git formatted patch if possible. Of course, if Git is not used upstream, then it's fine.

I didn't manage to find any official PyQt repository. But if it exists I suppose it would be a Mercurial repo since all the other Riverbank projects use Mercurial too.

OK. Then the patch format is OK as-is.

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines

+# Since we can't run generate qtdetail.out by running qtdetail on target device

package/python-pyqt5/python-pyqt5.mk new file +3 -0
+# we must generate the configuration.
+define PYTHON_PYQT5_GENERATE_QTDETAIL
+	$(RM) -f $(1)/qtdetail.out
Quoted 8 lines

package/python-pyqt5/python-pyqt5.mk line 51

Quoted 6 lines
package/python-pyqt5/python-pyqt5.mk new file +6 -0
+	$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_LICENSE),$(1))
+	$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_TYPE),$(1))
+	$(foreach f,$(PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES),
+		$(call PYTHON_PYQT5_QTDETAIL,$(f),$(1)) \
+	)
+endef  

So this is all exactly the same as PyQt4 ?

Quoted 2 lines

It's not all the same - I already removed some switches which aren't required in PyQt5. But I'm gonna recheck if I can remove even more.

OK.

Quoted 5 lines
Quoted 3 lines

Can you test after removing this compileall line? Indeed, we are now byte-compiling all Python modules globally. If it works, a patch removing this line for python-pyqt.mk would be good to have.

I'm gonna do that.

Great, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#7 lore raw

PATCH v2 1/1 python-pyqt5: new package

In reply to Manuel Vögele

---
Changes v1 -> v2:
- Config.in
- Dependencies & comment now match those from qt5 (instead of qt4)
- Adjusted help text
- Removed ARCH_USES_QREAL_FLOAT setting
- python-pyqt5.mk
- Removed ARCH_USES_QREAL_FLOAT setting
- Added PyQt_Desktop_OpenGL compile switch
- Fixed a typo in a comment
- Removed the compileall directive in INSTALL_TARGET_CMDS

I also rechecked if i could remove PyQt_SSL or PyQt_OpenGL (I can't)

---
 package/Config.in                                  |  1 +
 .../0001-configure-skip-qtdetail.patch             | 29 ++++++++
 package/python-pyqt5/Config.in                     | 17 +++++
 package/python-pyqt5/python-pyqt5.hash             |  3 +
 package/python-pyqt5/python-pyqt5.mk               | 79 ++++++++++++++++++++++
 5 files changed, 129 insertions(+)
 create mode 100644 package/python-pyqt5/0001-configure-skip-qtdetail.patch
 create mode 100644 package/python-pyqt5/Config.in
 create mode 100644 package/python-pyqt5/python-pyqt5.hash
 create mode 100644 package/python-pyqt5/python-pyqt5.mk
package/Config.in +1 -0
index 1e51a45..c4b4ed1 100644
@@ -734,6 +734,7 @@ menu "External python modules"
 	source "package/python-pyparted/Config.in"
 	source "package/python-pypcap/Config.in"
 	source "package/python-pyqt/Config.in"
+	source "package/python-pyqt5/Config.in"
 	source "package/python-pyratemp/Config.in"
 	source "package/python-pyro/Config.in"
 	source "package/python-pyroute2/Config.in"
package/python-pyqt5/0001-configure-skip-qtdetail.patch new file +29 -0
new file mode 100644
index 0000000..2e7b331
@@ -0,0 +1,29 @@
+Do not run qtdetail
+
+qtdetail is a tool that generates qtdetail.out. Since this program is
+cross-compiled, it's not possible to run it on the host.
+
+Consequently, python-pyqt5.mk generates the qtdetail.out file before
+calling configure.py.
+
+Therefore, this patch makes sure that the pre-generated qtdetail.out
+file is kept, and that qtdetail is not executed.
+
+Signed-off-by: Gwenhael Goavec-Merou <[email protected]>
+Signed-off-by: Sergey Kostanbaev <[email protected]>
+---
+Index: PyQt5_gpl-5.7/configure.py
+===================================================================
+--- PyQt5_gpl-5.7.orig/configure.py
++++ PyQt5_gpl-5.7/configure.py
+@@ -672,10 +672,6 @@ int main(int argc, char **argv)
+         if cmd is None:
+             error("Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.")
+ 
+-        # Create the output file, first making sure it doesn't exist.
+-        remove_file(out_file)
+-        run_command(cmd, verbose)
+-
+         if not os.access(out_file, os.F_OK):
+             error("%s failed to create %s. Make sure your Qt installation is correct." % (cmd, out_file))
+ 
package/python-pyqt5/Config.in new file +17 -0
new file mode 100644
index 0000000..98c709e
@@ -0,0 +1,17 @@
+comment "python-pyqt5 needs a toolchain w/ wchar, NPTL, C++, dynamic library"
+        depends on !BR2_PACKAGE_QT
+        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+
+config BR2_PACKAGE_PYTHON_PYQT5
+	bool "python-pyqt5"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_WCHAR # qt5
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # qt5
+	depends on !BR2_STATIC_LIBS # qt5
+	depends on !BR2_PACKAGE_QT # qt5
+	select BR2_PACKAGE_QT5
+	select BR2_PACKAGE_PYTHON_SIP
+	help
+	  Python bindings for Qt 5
+
+	  http://www.riverbankcomputing.com/software/pyqt/
package/python-pyqt5/python-pyqt5.hash new file +3 -0
new file mode 100644
index 0000000..2a7d05b
@@ -0,0 +1,3 @@
+# md5 from http://http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7, sha256 locally computed
+md5	e3dc21f31fd714659f0688e1eb31bacf  PyQt5_gpl-5.7.tar.gz
+sha256	892693ba5f79989abb2061dad2d5c4e6f127e9dd3240f73f8220c7152cd35b05  PyQt5_gpl-5.7.tar.gz
package/python-pyqt5/python-pyqt5.mk new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.1.4
#8 lore raw

PATCH v2 1/1 python-pyqt5: new package

Hello,

I've applied your patch, after doing just a small change to it, see below.

package/python-pyqt5/Config.in line 2

Quoted 7 lines · Manuel V?gele

new file mode 100644
index 0000000..98c709e

package/python-pyqt5/Config.in new file +2 -0
@@ -0,0 +1,17 @@
+comment "python-pyqt5 needs a toolchain w/ wchar, NPTL, C++, dynamic library"
+        depends on !BR2_PACKAGE_QT

This line is unrelated (mentions Qt, while this package is for Qt5), and in fact not needed: this package is *selecting* Qt5, so there is no need to take into account a Qt dependency here.

package/python-pyqt5/Config.in line 3

Quoted 1 line
package/python-pyqt5/Config.in new file +1 -0
+        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS

This line is intended with spaces, while it should have been intended with a tab. Also, it was too long, so I've split the line.

I've fixed those minor details and applied.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#9 lore raw

PATCH v2 1/1 python-pyqt5: new package

Quoted 5 lines · Thomas Petazzoni
Quoted 2 lines

+comment "python-pyqt5 needs a toolchain w/ wchar, NPTL, C++, dynamic library"

Quoted 1 line

+ depends on !BR2_PACKAGE_QT

This line is unrelated (mentions Qt, while this package is for Qt5), and in fact not needed: this package is *selecting* Qt5, so there is no need to take into account a Qt dependency here.

Well, since the main symbol depends on !BR2_PACKAGE_QT, you would expect either
a comment that explains that, or you would expect the other comments to be hidden. So to me it makes sense to have that depends for the comment. Otherwise, you go and enable wchar, NPTL, C++, dynlib, you come back, and hey presto the comment disappears but the package still can't be selected.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#10 lore raw

PATCH v2 1/1 python-pyqt5: new package

Hello,

Quoted 5 lines · Arnout Vandecappelle

Well, since the main symbol depends on !BR2_PACKAGE_QT, you would expect either
a comment that explains that, or you would expect the other comments to be hidden. So to me it makes sense to have that depends for the comment. Otherwise, you go and enable wchar, NPTL, C++, dynlib, you come back, and hey presto the comment disappears but the package still can't be selected.

Indeed. Thanks for correcting me on this. Fixed in
https://git.buildroot.org/buildroot/commit/?id=b62fdfdc274e592675a4894b893841991e72c913.

Thanks again!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com