-
Notifications
You must be signed in to change notification settings - Fork 106
Build & generator cleanup: drop Qt5 wrapper fallbacks, switch CI to Qt 6.10, normalize macOS includes, add qmake toggles, and regenerate wrappers in CI #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d86b49e
to
fede61a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
adbed21
to
b84b752
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
b84b752
to
f173927
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Introduce two qmake CONFIG flags to control subdir builds: - CONFIG+=generator_only -> build just the wrapper generator - CONFIG+=exclude_generator -> build everything except the generator Default remains unchanged (all subdirs). This enables CI to generate wrappers first, then build without the generator to avoid redundant work.
@hjmjohnson Thanks for getting this started, I was able to spend a bit of time to improve the build-system and continuous integration accordingly. |
e23b02a
to
2434015
Compare
Split the pipeline in each job: 1) qmake build with CONFIG+=generator_only 2) run pythonqt_generator 3) qmake build with CONFIG+=exclude_generator and run tests
2434015
to
6aa308d
Compare
Default to `../generated_cpp` (generator output). If missing, probe the exact-version dir (`generated_cpp_<MAJOR><MINOR>`, e.g., 515) and then the legacy Qt5 fallbacks. Also allow override via: ``` qmake PYTHONQT_GENERATED_PATH=/abs/path ``` When wrappers are absent, emit a concise error that lists the searched paths and indicates how to generate them.
6aa308d
to
3f119cb
Compare
@jcfr You are awesome! Thank you for taking a closer look at the CI and improving its robustness. |
@jcfr Looks really close to working. I'm surprised that the debug variant passes, but the release variant fails with a missing header: https://github.com/MeVisLab/pythonqt/actions/runs/18065296643/job/51407182062?pr=313#step:9:124 error. |
@jcfr You may already know of this tool, but I thought I'd put it here for documentation purposes: |
|
Follow-up of 19738be ("feat(generator): discover Qt include/framework paths dynamically; add PYTHONQT_FRAMEWORK", 2025-09-18). On macOS, headers parsed from framework paths like: .../QtCore.framework/Headers/qbytearray.h .../QtCore.framework/Versions/A/Headers/qbytearray.h were emitted as relative framework paths. Update `AbstractMetaBuilder::getRelativeInclude()` to detect both layouts and emit only the basename (e.g., `<qbytearray.h>`).
69c29cf
to
dfeadb6
Compare
6279678
to
fc97c64
Compare
I am able to reproduce locally:
... note that specifying
|
When dowloading https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_6100/qt6_6100/Updates.xml.sha256 where when dowloading https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_693/qt6_693/Updates.xml.sha256 |
.. but the file https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_693/qt6_693/Updates.xml.sha256 does not exist anymore ![]() |
Recommend that anyone using that Qt version to re-run the generator. Remove redundant example directories. generated_cpp_50 generated_cpp_53 generated_cpp_54 generated_cpp_56 generated_cpp_511 The generated_cpp_515 serves as an example of what kind of code is generated.
This also works around an issue where `aqtinstall` attempt was attempting to download the non existing checksum associated with `qt6_693/qt6_693/Updates.xml`[^1]. Indeed, as of Sept 29th 2025, the file `qt6_693/qt6_693/Updates.xml.sha256`[^2] is not available anymore. [^1]: https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_693/qt6_693/Updates.xml [^2]: https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_693/qt6_693/Updates.xml.sha256
…n explicit/generated path Remove the hard-coded auto-selection of checked-in wrapper sets (`generated_cpp_50`, `_54`, `_56`, `_511`, `_515`) for Qt5. The build now relies solely on: * an explicit `PYTHONQT_GENERATED_PATH` provided by the caller, **or** * the default `$$PWD/../generated_cpp` when it exists, and otherwise fails fast with a clear error message listing where we looked.
4fc8297
to
253e01d
Compare
This comment was marked as outdated.
This comment was marked as outdated.
… APIs This changes the generator to exclude unsupported functions in QJsonObject and QCborMap for Qt 6.10. The functions asKeyValueRange, constKeyValueBegin, and constKeyValueEnd are now marked for rejection.
@hjmjohnson This can now be marked as ready for review |
@usiems @mrbean-bremen This is now ready for final review & integration 🚀 🙏 |
…ake toggles - Drop claim that wrappers are pre-generated/checked-in. - Document default generator output (../generated_cpp) and override via PYTHONQT_GENERATED_PATH. - Describe qmake toggles (generator_only / exclude_generator) and switch build steps to top-level PythonQt.pro: first generate wrappers, then build runtime (and extensions) without rebuilding the generator.
ddc9202
to
671a16c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I've been reviewing this while it was ongoing, and I don't see any problems.
As usually, also want to see @usiems' opinion (best to review the commits separately).
And kudos to @hjmjohnson for keeping the momentum going 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jcfr for working through the CI fixes
…ribution This ensures that headers like `bits/wordsize.h` included from `qconfig.h` found in multi-lib Qt distributions will properly define `__WORDSIZE` so that the expected header `QtCore/qconfig-64.h` is included.
This changes the QTDIR to /usr/include/qt5 and passes the correct include paths to the pythonqt_generator script, ensuring that necessary headers are found without extra symbolic links. Fixes MeVisLab#291
… QLibraryInfo - Headers: if QTDIR/include exists, use it; otherwise treat QTDIR as the include root. This conditional append avoids re-introducing the /usr/include/qt5ln symlink workaround removed in previous commit. - Frameworks (macOS): prefer QTDIR/lib; fallback to QLibraryInfo::LibrariesPath. - Retains existing CLI/env include and framework overrides.
To conclude, the commit |
@he-hesce To follow-up on #314 (comment), this pull request fixes the generation of wrappers on Rocky Linux. |
@mrbean-bremen @usiems Et voila, this is ready for another round of review. It now includes
|
I'm really happy with the changes. Good work! |
This PR modernizes PythonQt’s wrapper generation & build pipeline and aligns CI with Qt 6.10. It removes legacy, checked-in Qt5 wrapper directories, relies on explicit/generated paths at build time, normalizes macOS includes to bare Qt headers, adds qmake toggles for targeted builds, and updates CI to first generate wrappers then build without the generator. It also excludes a new
std::string_view
operator introduced in Qt 6.10 that is not yet supported by the generator.Summary
Add
CONFIG+=generator_only
(build just the wrapper generator).Add
CONFIG+=exclude_generator
(build everything except the generator).CI
Switch "latest" pipeline from Qt 6.9 -> Qt 6.10 (workaround missing
Updates.xml.sha256
for 6.9.3).Restructure jobs to:
pythonqt_generator
,On macOS, generate wrappers for both Debug and Release.
Repository housekeeping
Remove stale example wrapper trees:
generated_cpp_50
,generated_cpp_53
,generated_cpp_54
,generated_cpp_56
,generated_cpp_511
generated_cpp_515
as the canonical example.How to build now
Preferred: generate wrappers into
../generated_cpp
(relative to the build) or point qmake at an absolute path.Then build without the generator:
qmake CONFIG+=exclude_generator make -j$(nproc)
If wrappers are missing, the build will fail early with a message listing searched locations and how to generate them.
Notes
std::string_view
operator is skipped in the typesystem until binding support is implemented.