From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Dylan Bespalko <dylan.bespalko@gmail.com>,
Roy Kollen Svendsen <roykollensvendsen@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: [Buildroot] [PATCH v4 2/3] package/python-pyside6: new package
Date: Mon, 16 Nov 2026 16:56:51 +0100 [thread overview]
Message-ID: <20261116155652.4181839-3-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20261116155652.4181839-1-angelo.compagnucci@gmail.com>
From: Dylan Bespalko <dylan.bespalko@gmail.com>
PySide6 is the official Python binding of Qt6, from the Qt for Python
project. It is built with the Shiboken6 generator, from the same
release tarball.
The bindings are built only for the Qt6 modules that are enabled in
the configuration.
A PySide6 program needs a Qt platform plugin. Select one with
BR2_PACKAGE_QT6BASE_DEFAULT_QPA at build time, or with the
QT_QPA_PLATFORM environment variable at run time.
pyside-tools is not packaged. It holds pyside6-uic and pyside6-rcc,
but the Qt host tools do the same job and write Python code:
$(HOST_DIR)/libexec/uic -g python
$(HOST_DIR)/libexec/rcc -g python
Buildroot has Python bindings for Qt5 only, in python-pyqt5. This
package adds the bindings for Qt6.
Signed-off-by: Dylan Bespalko <dylan.bespalko@gmail.com>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v3 -> v4:
- Split from the python-shiboken6 patch
- Bump to 6.11.3. The package moves to package/qt6/, follows
QT6_VERSION and uses the tarball of python-shiboken6
- Depend on BR2_PACKAGE_QT6_GL_SUPPORTS instead of selecting it: it
is a blind option. Depend on BR2_PACKAGE_LLVM_ARCH_SUPPORTS too
- Drop --compiler-path=$(HOST_DIR)/bin/clang: shiboken already uses
the cross compiler in a cross build. Drop STANDALONE=ON: it is for
wheels that bundle Qt
- Fix the condition of OpenGLWidgets. Add the Quick modules only when
qt6declarative has Quick support
- Keep the upstream order of the modules in MODULES: they are built
in that order
- Help text: point to "uic -g python" and "rcc -g python" instead of
pyside-tools [Dylan Bespalko]
- DEVELOPERS: v3 added an entry for Dylan. v4 does not: the packages
are now in package/qt6/, which already has maintainers. Dylan, tell
me if you want to be listed
package/qt6/Config.in | 1 +
package/qt6/python-pyside6/Config.in | 32 +++++++
.../qt6/python-pyside6/python-pyside6.hash | 9 ++
package/qt6/python-pyside6/python-pyside6.mk | 86 +++++++++++++++++++
4 files changed, 128 insertions(+)
create mode 100644 package/qt6/python-pyside6/Config.in
create mode 100644 package/qt6/python-pyside6/python-pyside6.hash
create mode 100644 package/qt6/python-pyside6/python-pyside6.mk
diff --git a/package/qt6/Config.in b/package/qt6/Config.in
index 42a24f0c0a..b6295ed295 100644
--- a/package/qt6/Config.in
+++ b/package/qt6/Config.in
@@ -43,6 +43,7 @@ menuconfig BR2_PACKAGE_QT6
if BR2_PACKAGE_QT6
+source "package/qt6/python-pyside6/Config.in"
source "package/qt6/python-shiboken6/Config.in"
source "package/qt6/qt6base/Config.in"
source "package/qt6/qt6charts/Config.in"
diff --git a/package/qt6/python-pyside6/Config.in b/package/qt6/python-pyside6/Config.in
new file mode 100644
index 0000000000..1b1a2ecc04
--- /dev/null
+++ b/package/qt6/python-pyside6/Config.in
@@ -0,0 +1,32 @@
+config BR2_PACKAGE_PYTHON_PYSIDE6
+ bool "python-pyside6"
+ depends on BR2_PACKAGE_PYTHON3
+ depends on BR2_PACKAGE_QT6
+ depends on BR2_PACKAGE_QT6_GL_SUPPORTS # QtGui OpenGL classes
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # python-shiboken6
+ select BR2_PACKAGE_PYTHON_SHIBOKEN6
+ select BR2_PACKAGE_QT6BASE_GUI
+ select BR2_PACKAGE_QT6BASE_OPENGL
+ select BR2_PACKAGE_QT6BASE_WIDGETS
+ select BR2_PACKAGE_OPENSSL if BR2_PACKAGE_QT6BASE_NETWORK # QtNetwork SSL classes
+ help
+ Qt for Python: the official Python bindings of Qt6.
+
+ The bindings cover the Qt6 modules that are enabled.
+
+ A PySide6 program needs a Qt platform plugin. Select one
+ with BR2_PACKAGE_QT6BASE_DEFAULT_QPA at build time, or with
+ the QT_QPA_PLATFORM environment variable at run time.
+
+ pyside6-uic and pyside6-rcc are not installed. To convert
+ .ui and .qrc files to Python, use the Qt tools:
+ "$(HOST_DIR)/libexec/uic -g python" and
+ "$(HOST_DIR)/libexec/rcc -g python".
+
+ https://doc.qt.io/qtforpython-6/
+
+comment "python-pyside6 needs an OpenGL-capable backend"
+ depends on BR2_PACKAGE_PYTHON3
+ depends on BR2_PACKAGE_QT6
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+ depends on !BR2_PACKAGE_QT6_GL_SUPPORTS
diff --git a/package/qt6/python-pyside6/python-pyside6.hash b/package/qt6/python-pyside6/python-pyside6.hash
new file mode 100644
index 0000000000..739dc15ea9
--- /dev/null
+++ b/package/qt6/python-pyside6/python-pyside6.hash
@@ -0,0 +1,9 @@
+# From https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-6.11.3-src/pyside-setup-everywhere-src-6.11.3.tar.xz.sha256
+sha256 050819cb05e14d6689f42b56e4fa9c8ff63be2bb339e0c094c45b990b7cabde1 pyside-setup-everywhere-src-6.11.3.tar.xz
+
+# Hash for license files
+sha256 62803a6fcceef9091a129d7293d2469ea332b35d30f5e1bc4c628a9f35f3d29c LICENSES/BSD-3-Clause.txt
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSES/GPL-2.0-only.txt
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSES/GPL-3.0-only.txt
+sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 LICENSES/LGPL-3.0-only.txt
+sha256 40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2 LICENSES/Qt-GPL-exception-1.0.txt
diff --git a/package/qt6/python-pyside6/python-pyside6.mk b/package/qt6/python-pyside6/python-pyside6.mk
new file mode 100644
index 0000000000..28656d8f18
--- /dev/null
+++ b/package/qt6/python-pyside6/python-pyside6.mk
@@ -0,0 +1,86 @@
+################################################################################
+#
+# python-pyside6
+#
+################################################################################
+
+# Qt for Python must have the same version as Qt6
+PYTHON_PYSIDE6_VERSION = $(QT6_VERSION)
+PYTHON_PYSIDE6_SITE = https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-$(PYTHON_PYSIDE6_VERSION)-src
+PYTHON_PYSIDE6_SOURCE = pyside-setup-everywhere-src-$(PYTHON_PYSIDE6_VERSION).tar.xz
+PYTHON_PYSIDE6_DL_SUBDIR = python-shiboken6
+PYTHON_PYSIDE6_SUBDIR = sources/pyside6
+PYTHON_PYSIDE6_LICENSE = \
+ LGPL-3.0 or GPL-2.0 or GPL-3.0 (bindings), \
+ GPL-3.0 with Qt-GPL-exception-1.0 (tools), \
+ BSD-3-Clause (examples, cmake)
+PYTHON_PYSIDE6_LICENSE_FILES = \
+ LICENSES/BSD-3-Clause.txt \
+ LICENSES/GPL-2.0-only.txt \
+ LICENSES/GPL-3.0-only.txt \
+ LICENSES/LGPL-3.0-only.txt \
+ LICENSES/Qt-GPL-exception-1.0.txt
+PYTHON_PYSIDE6_CPE_ID_VENDOR = qt
+PYTHON_PYSIDE6_CPE_ID_PRODUCT = pyside
+PYTHON_PYSIDE6_SUPPORTS_IN_SOURCE_BUILD = NO
+PYTHON_PYSIDE6_INSTALL_STAGING = YES
+
+PYTHON_PYSIDE6_DEPENDENCIES = \
+ host-python-shiboken6 \
+ python-shiboken6 \
+ qt6base
+
+# The modules are built in the order of this list, and a module needs
+# the ones before it. Keep the order of ALL_ESSENTIAL_MODULES and
+# ALL_OPTIONAL_MODULES in sources/pyside6/cmake/PySideHelpers.cmake.
+PYTHON_PYSIDE6_MODULES = \
+ Core \
+ Gui \
+ Widgets \
+ $(if $(BR2_PACKAGE_QT6BASE_PRINTSUPPORT),PrintSupport) \
+ $(if $(BR2_PACKAGE_QT6BASE_SQL),Sql) \
+ $(if $(BR2_PACKAGE_QT6BASE_NETWORK),Network) \
+ $(if $(BR2_PACKAGE_QT6BASE_TEST),Test) \
+ $(if $(BR2_PACKAGE_QT6BASE_CONCURRENT),Concurrent) \
+ $(if $(BR2_PACKAGE_QT6BASE_DBUS),DBus) \
+ $(if $(BR2_PACKAGE_QT6BASE_XML),Xml) \
+ OpenGL \
+ OpenGLWidgets
+
+ifeq ($(BR2_PACKAGE_QT6DECLARATIVE),y)
+PYTHON_PYSIDE6_DEPENDENCIES += qt6declarative
+PYTHON_PYSIDE6_MODULES += Qml
+ifeq ($(BR2_PACKAGE_QT6DECLARATIVE_QUICK),y)
+PYTHON_PYSIDE6_MODULES += \
+ Quick \
+ QuickControls2 \
+ $(if $(BR2_PACKAGE_QT6BASE_TEST),QuickTest) \
+ QuickWidgets
+endif
+endif
+
+ifeq ($(BR2_PACKAGE_QT6SERIALPORT),y)
+PYTHON_PYSIDE6_DEPENDENCIES += qt6serialport
+PYTHON_PYSIDE6_MODULES += SerialPort
+ifeq ($(BR2_PACKAGE_QT6SERIALBUS),y)
+PYTHON_PYSIDE6_DEPENDENCIES += qt6serialbus
+PYTHON_PYSIDE6_MODULES += SerialBus
+endif
+endif
+
+ifeq ($(BR2_PACKAGE_QT6SVG),y)
+PYTHON_PYSIDE6_DEPENDENCIES += qt6svg
+PYTHON_PYSIDE6_MODULES += Svg SvgWidgets
+endif
+
+# The Qt headers are in the sysroot, so shiboken takes them for system
+# headers and skips them. PYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM
+# makes it process them.
+PYTHON_PYSIDE6_CONF_OPTS = \
+ -DBUILD_TESTS=OFF \
+ -DMODULES="$(subst $(space),;,$(strip $(PYTHON_PYSIDE6_MODULES)))" \
+ -DPYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM=ON \
+ -DQFP_SHIBOKEN_HOST_PATH=$(HOST_DIR) \
+ -DQFP_PYTHON_HOST_PATH=$(HOST_DIR)/bin/python3
+
+$(eval $(cmake-package))
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-11-16 15:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 8:03 [Buildroot] [PATCH v3 1/1] added package/python-{shiboken6, pyside6}: new packages Dylan Bespalko
2024-08-14 6:02 ` Dylan Bespalko
2026-11-16 15:56 ` [Buildroot] [PATCH v4 0/3] package/python-pyside6: new package Angelo Compagnucci
2026-11-16 15:56 ` [Buildroot] [PATCH v4 1/3] package/python-shiboken6: " Angelo Compagnucci
2026-11-16 15:56 ` Angelo Compagnucci [this message]
2026-11-16 15:56 ` [Buildroot] [PATCH v4 3/3] support/testing: add python-pyside6 runtime test Angelo Compagnucci
2026-11-16 21:29 ` [Buildroot] [PATCH v4 0/5] package/python-pyside6: new package Angelo Compagnucci
2026-11-16 21:29 ` [Buildroot] [PATCH v4 1/5] package/python-shiboken6: " Angelo Compagnucci
2026-11-16 21:29 ` [Buildroot] [PATCH v4 2/5] package/python-pyside6: " Angelo Compagnucci
2026-11-16 21:29 ` [Buildroot] [PATCH v4 3/5] support/testing: add python-pyside6 runtime test Angelo Compagnucci
2026-11-16 21:29 ` [Buildroot] [PATCH v4 4/5] package/python-matplotlib: add Qt6 support to the Qt display Angelo Compagnucci
2026-11-16 21:29 ` [Buildroot] [PATCH v4 5/5] support/testing: add python-matplotlib runtime test Angelo Compagnucci
2026-11-16 21:36 ` [Buildroot] [PATCH v5 0/5] package/python-pyside6: new package Angelo Compagnucci
2026-11-16 21:36 ` [Buildroot] [PATCH v5 1/5] package/python-shiboken6: " Angelo Compagnucci
2026-11-16 21:36 ` [Buildroot] [PATCH v5 2/5] package/python-pyside6: " Angelo Compagnucci
2026-11-16 21:36 ` [Buildroot] [PATCH v5 3/5] support/testing: add python-pyside6 runtime test Angelo Compagnucci
2026-11-16 21:36 ` [Buildroot] [PATCH v5 4/5] package/python-matplotlib: add Qt6 support to the Qt display Angelo Compagnucci
2026-11-16 21:36 ` [Buildroot] [PATCH v5 5/5] support/testing: add python-matplotlib runtime test Angelo Compagnucci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116155652.4181839-3-angelo.compagnucci@gmail.com \
--to=angelo.compagnucci@gmail.com \
--cc=buildroot@buildroot.org \
--cc=dylan.bespalko@gmail.com \
--cc=roykollensvendsen@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.