Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f26412a
Add pyside6-essentials 6.11.2 riscv64 build
luhenry Oct 15, 2026
fb355cb
pyside6-essentials: point shiboken at clang builtin headers
luhenry Oct 23, 2026
d90e4da
pyside6-essentials: patch libpyside for Qt 6.10.1's QMetaPropertyBuilder
luhenry Oct 25, 2026
d14fa49
pyside6-essentials: Record target Python versions
luhenry Nov 5, 2026
8009452
pyside6-essentials: Use dynamic Python matrix
luhenry Nov 5, 2026
ab89872
Merge remote-tracking branch 'origin/main' into HEAD
luhenry Nov 5, 2026
2869bee
Merge remote-tracking branch 'origin/main' into HEAD
luhenry Nov 6, 2026
ab360b8
pyside6-essentials: Use target file metadata
luhenry Nov 6, 2026
86601b9
pyside6-essentials: Avoid duplicate platform-independent builds
luhenry Nov 6, 2026
e771f09
Merge remote-tracking branch 'origin/main' into HEAD
luhenry Nov 6, 2026
023d61c
pyside6-essentials: drop Qt 6.11-only wrappers against Qt 6.10
luhenry Nov 8, 2026
642a9d0
pyside6-essentials: drop QStyleOptionMenuItemV2 wrapper for Qt 6.10 too
luhenry Nov 9, 2026
9dbb630
Merge remote-tracking branch 'origin/main' into HEAD
luhenry Nov 9, 2026
38d1f11
pyside6-essentials: pass matrix input to _publish-wheel.yml
luhenry Nov 10, 2026
eb821cc
pyside6-essentials: skip bundled Qt tools in the standalone build
luhenry Nov 11, 2026
9caa987
Merge remote-tracking branch 'origin/main' into HEAD
luhenry Nov 11, 2026
6260906
pyside6-essentials: skip the designer plugin copy when it was not built
luhenry Nov 16, 2026
7931bac
pyside6-essentials: point auditwheel at shiboken6's .so via LD_LIBRAR…
luhenry Nov 16, 2026
a4e158f
pyside6-essentials: fix nested-quote bug breaking LD_LIBRARY_PATH export
luhenry Nov 16, 2026
590fc76
pyside6-essentials: install gtk3-devel so auditwheel can bundle libgt…
luhenry Nov 16, 2026
531e5e4
pyside6-essentials: dedent the python3 -c import-check heredoc
luhenry Nov 17, 2026
6aa38b3
pyside6-essentials: exclude libshiboken6 from the auditwheel repair
luhenry Nov 17, 2026
fe0a8db
gotchas: document the auditwheel LD_LIBRARY_PATH/--exclude interaction
luhenry Nov 17, 2026
b2f4c20
Merge branch 'main' into pyside6-essentials
luhenry Nov 17, 2026
fe3e57a
pyside6-essentials: diagnostics only, not a fix, for the bare-signal …
luhenry Nov 17, 2026
df1b7a5
pyside6-essentials: run the QtQuick crash live under gdb, not via cor…
luhenry Nov 17, 2026
7ad257f
pyside6-essentials: fix a tooling bug in the gdb diagnostic comment
luhenry Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 252 additions & 0 deletions .github/workflows/build-pyside6-essentials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# Based on: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/create_wheels.py?h=6.11.2
name: Build pyside6-essentials wheels (riscv64)

on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/pyside6-essentials.yaml not released yet'
required: false
default: ''
pull_request:
branches: [main]
paths:
- '.github/workflows/build-pyside6-essentials.yml'
- 'docs/packages/pyside6-essentials.yaml'
- 'patches/pyside6-essentials/**'
push:
branches: [main]
paths:
- '.github/workflows/build-pyside6-essentials.yml'
- 'docs/packages/pyside6-essentials.yaml'
- 'patches/pyside6-essentials/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

env:
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
# Rocky 10's riscv64 repos ship no patchelf package (gotcha 95), and pip installing
# the `patchelf` PyPI package builds NixOS/patchelf from source, which runs its own
# `make check` and fails 8/48 tests on riscv64. pyside-setup's build_patchelf() just
# needs the binary on PATH, so fetch NixOS/patchelf's own riscv64 release instead.
PATCHELF_VERSION: '0.17.2'
PATCHELF_SHA256: '4b28f7bc890c42076b2955be2229ac1607aa9a6d4ee40e33d69517ef0c403a56'

jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: pyside6-essentials
version: ${{ inputs.version }}

build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
name: Build pyside6-essentials ${{ matrix.version }} cp310-abi3-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 1440

env:
PYSIDE_VERSION: ${{ matrix.version }}

steps:
- name: Checkout pyside-setup ${{ env.PYSIDE_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: pyside/pyside-setup
ref: ${{ env.PYSIDE_VERSION }}
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false

- name: Apply patches
run: git apply python-wheels/patches/pyside6-essentials/${{ env.PYSIDE_VERSION }}/*.patch

- name: Pull manylinux_riscv64 image
run: docker pull "${MANYLINUX_RISCV64_IMAGE}"

# pyside-setup's build_scripts/config.py only exposes four --build-type values
# (all/shiboken6/shiboken6-generator/pyside6); PySide6_Essentials, PySide6_Addons
# and the PySide6 meta-wheel aren't build targets at all, they're carved out of
# one accumulated build/<env>a/package_for_wheels tree by create_wheels.py. So
# shiboken6-generator and shiboken6 are rebuilt here too (even though only
# Essentials is published by this workflow) to populate that tree; a future
# pyside6-addons/pyside6 port can extend this same build (gotcha 382).
- name: Build shiboken6-generator, shiboken6 and pyside6, then carve out wheels
run: |
docker run --rm -v "$(pwd):/work" -w /work \
-e PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ \
-e PATCHELF_VERSION="${PATCHELF_VERSION}" \
-e PATCHELF_SHA256="${PATCHELF_SHA256}" \
"${MANYLINUX_RISCV64_IMAGE}" bash -c '
set -euxo pipefail
dnf -y install clang-devel llvm-devel "qt6-qt*-devel" \
libxcb-devel libX11-devel libxkbcommon-devel fontconfig-devel gtk3-devel
curl -fsSL -o /tmp/patchelf.tar.gz \
"https://github.com/NixOS/patchelf/releases/download/${PATCHELF_VERSION}/patchelf-${PATCHELF_VERSION}-riscv64.tar.gz"
echo "${PATCHELF_SHA256} /tmp/patchelf.tar.gz" | sha256sum -c -
tar xzf /tmp/patchelf.tar.gz -C /usr/local
rm -f /tmp/patchelf.tar.gz
pybin=/opt/python/cp312-cp312/bin
export PATH="$pybin:$PATH"
"$pybin/pip" install -q \
"setuptools==78.1.0" "packaging==24.2" "build==1.2.2.post1" \
"wheel==0.46.3" "distro==1.9.0" "ninja==1.13.2" "pyproject_hooks==1.2.0"
tar xJf /opt/_internal/static-libs-for-embedding-only.tar.xz -C /opt/_internal
"$pybin/python3" setup.py bdist_wheel \
--build-type=shiboken6-generator \
--qtpaths=/usr/bin/qtpaths6 \
--cmake=/usr/bin/cmake \
--parallel="$(nproc)" \
--skip-docs \
--limited-api=yes
"$pybin/pip" install -q --no-deps dist/shiboken6_generator-*.whl
"$pybin/python3" setup.py bdist_wheel \
--build-type=shiboken6 \
--qtpaths=/usr/bin/qtpaths6 \
--cmake=/usr/bin/cmake \
--parallel="$(nproc)" \
--skip-docs \
--limited-api=yes
"$pybin/pip" install -q dist/shiboken6-*.whl
# shiboken6 (ApiExtractor) adds libclang builtin headers (stddef.h, ...) from
# $LLVM_INSTALL_DIR/lib/clang/<ver>/include, else from `llvm-config --libdir`.
# Rocky 10 llvm-config reports /usr/lib64/llvm21/lib64, but clang-libs puts
# the headers in /usr/lib/clang/21/include, so every Qt module failed with
# "stddef.h file not found". Point it at /usr so it finds /usr/lib/clang/21.
# --standalone bundles+rpath-patches assistant/designer/linguist
# (PYSIDE_UNIX_BUNDLED_TOOLS) unconditionally; none is installed by the
# qt6-qt*-devel packages above, so patchelf failed on a file that was
# never copied. --no-qt-tools skips them -- they are standalone Qt dev
# tools, not part of the `import PySide6` surface this wheel ships.
LLVM_INSTALL_DIR=/usr \
"$pybin/python3" setup.py bdist_wheel \
--build-type=pyside6 \
--standalone \
--qtpaths=/usr/bin/qtpaths6 \
--cmake=/usr/bin/cmake \
--parallel="$(nproc)" \
--skip-docs \
--limited-api=yes \
--no-qt-tools
"$pybin/python3" create_wheels.py --no-examples
"$pybin/pip" install -q auditwheel
# pyside6_essentials QtQml.abi3.so etc. carry an $ORIGIN/../shiboken6/ RPATH
# (valid once installed next to the shiboken6 wheel), but auditwheel repair
# inspects the extracted wheel tree in isolation, where that relative
# path does not resolve -- it only finds NEEDED libraries via LD_LIBRARY_PATH
# or the system lib dirs, not by searching site-packages. Without it,
# repair failed with: ValueError: Cannot repair wheel, because required
# library "libshiboken6.abi3.so.6.11" could not be located. Point it at the
# shiboken6 wheel already pip-installed above, where that .so actually lives.
export LD_LIBRARY_PATH="$("$pybin/python3" -c "import os, shiboken6; print(os.path.dirname(shiboken6.__file__))"):${LD_LIBRARY_PATH:-}"
# Real riscv64 CI: once LD_LIBRARY_PATH let auditwheel locate
# libshiboken6, it went ahead and vendored a private copy of that .so
# into pyside6_essentials (gotcha 17 dep-wheel case) instead of
# trusting the $ORIGIN/../shiboken6/ RPATH above. That gives the
# process two independent libshiboken6 instances at runtime -- the
# vendored copy QtCore.abi3.so links against, and the one the
# separately pip-installed shiboken6 wheel actually loads -- so their
# C++-side enum and type registries diverge and the smoke test import
# of PySide6.QtCore aborted with Fatal Python error: libshiboken:
# could not init enum. --exclude keeps the shiboken6 .so out of the
# repair so the wheel relies on the real shiboken6 install instead.
"$pybin/python3" -m auditwheel -v repair --plat manylinux_2_39_riscv64 \
--exclude libshiboken6.abi3.so.6.11 \
-w audited dist/pyside6_essentials-*.whl
rm -f dist/*.whl
mv audited/*.whl dist/
# Diagnostic only, not a fix: dump the actual RPATH of the repaired wheel
# so we can see in the real log whether auditwheel kept or dropped the original
# $ORIGIN/../shiboken6/ entry above (it only preserves rpath entries that
# resolve to somewhere inside the wheel being repaired, and shiboken6 lives
# in a separate wheel, so that entry may be silently dropped
"$pybin/python3" -c "
import glob, zipfile, subprocess, os
whl = glob.glob(\"dist/pyside6_essentials-*.whl\")[0]
zf = zipfile.ZipFile(whl)
names = [n for n in zf.namelist() if n.startswith(\"PySide6/\") and n.endswith(\".abi3.so\") and \".libs/\" not in n]
zf.extractall(\"/tmp/rpathcheck\", members=names)
zf.close()
for n in sorted(names):
print(\"RPATH\", n)
subprocess.run([\"patchelf\", \"--print-rpath\", os.path.join(\"/tmp/rpathcheck\", n)])
"
"$pybin/pip" install -q dist/pyside6_essentials-*.whl
# Diagnostic only, not a fix: the previous run confirmed the crash is a
# bare SIGABRT specifically on `import PySide6.QtQuick` (QtCore/QtGui/
# QtWidgets/QtNetwork/QtQml all import fine first), with zero stderr
# text (no glibc malloc-corruption message, no Qt warning) and no core
# file - the container on this runner has no CAP_SYS_ADMIN, so `ulimit
# -c unlimited` and writing /proc/sys/kernel/core_pattern both silently
# no-op (confirmed in the log of that run: "Operation not permitted" /
# "Read-only file system"). Run the import live under gdb instead of
# relying on a post-mortem core file, so the backtrace is captured at
# the moment of the abort regardless of core-dump permissions.
dnf -y install gdb || true
cat > /tmp/qtquick_smoke.py <<PYEOF
import sys
mods = ["QtCore", "QtGui", "QtWidgets", "QtNetwork", "QtQml", "QtQuick", "QtSql", "QtSvg"]
for name in mods:
print("importing", name)
sys.stdout.flush()
__import__("PySide6." + name)
print(name, "OK")
sys.stdout.flush()
print("PySide6 Essentials import OK")
PYEOF
set +e
gdb -q -batch \
-ex "run" \
-ex "bt full" \
-ex "info sharedlibrary" \
-ex "thread apply all bt" \
--args "$pybin/python3" /tmp/qtquick_smoke.py 2>&1 | tee /tmp/gdb_smoke.log
set -e
# gdb exit code reflects gdb, not the inferior - check for the
# final print from the script instead, same signal the plain
# smoke test used before this diagnostic wrapper.
if ! grep -q "PySide6 Essentials import OK" /tmp/gdb_smoke.log; then
echo "smoke test did not complete - see gdb backtrace above"
exit 1
fi
'

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pyside6-essentials-${{ env.PYSIDE_VERSION }}-cp310-abi3-manylinux_riscv64
path: dist/pyside6_essentials-*.whl
if-no-files-found: error

publish:
name: Publish pyside6-essentials ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
matrix: ${{ needs.setup.outputs.matrix }}
artifact-pattern: pyside6-essentials-${{ matrix.version }}-*-manylinux_riscv64
7 changes: 7 additions & 0 deletions docs/packages/pyside6-essentials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package-name: pyside6-essentials
source-code: https://code.qt.io/cgit/pyside/pyside-setup.git/
license: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
versions:
- version: 6.11.2
files:
- python: 3.10-abi3:manylinux
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Sun, 25 Oct 2026 00:00:00 +0000
Subject: [PATCH] libpyside: guard QMetaPropertyBuilder::setVirtual/setOverride
for Qt < 6.11

Upstream-Status: Inappropriate [our image ships Qt 6.10.1, not the 6.11.x pyside-setup 6.11.2 expects]

MetaObjectBuilderPrivate::addProperty() calls
QMetaPropertyBuilder::setVirtual()/setOverride(), which Qt added in
6.11 (alongside the PropertyFlag::Virtual/Override property flags).
As documented in this package's PR description, the manylinux_riscv64
image only has Rocky 10's Qt6 AppStream packages, which are Qt 6.10.1,
so these two calls fail to compile:

dynamicqmetaobject.cpp:352:17: error: 'class QMetaPropertyBuilder' has
no member named 'setVirtual'; did you mean 'setFinal'?
dynamicqmetaobject.cpp:353:17: error: 'class QMetaPropertyBuilder' has
no member named 'setOverride'

Guard both calls with a QT_VERSION check so the module still builds
against 6.10.1; QProperty's VIRTUAL/OVERRIDE qualifiers (QML-only,
cf. QTBUG-115656) simply won't be propagated onto the QMetaObject
under the downleveled Qt, same as every other 6.11-only surface this
build already exposes as 6.10 per the PR description.

diff --git a/sources/pyside6/libpyside/dynamicqmetaobject.cpp b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
index 0000000..0000000 100644
--- a/sources/pyside6/libpyside/dynamicqmetaobject.cpp
+++ b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
@@ -349,8 +349,10 @@ int MetaObjectBuilderPrivate::addProperty(const QByteArray &propertyName,
newProperty.setUser(flags.testFlag(PySide::Property::PropertyFlag::User));
newProperty.setConstant(flags.testFlag(PySide::Property::PropertyFlag::Constant));
newProperty.setFinal(flags.testFlag(PySide::Property::PropertyFlag::Final));
+#if QT_VERSION >= QT_VERSION_CHECK(6, 11, 0)
newProperty.setVirtual(flags.testFlag(PySide::Property::PropertyFlag::Virtual));
newProperty.setOverride(flags.testFlag(PySide::Property::PropertyFlag::Override));
+#endif

index = newProperty.index() + m_baseObject->propertyCount();
m_dirty = true;
--
2.43.0
Loading
Loading