Skip to content

py-pyside6: add package for PySide6 (Qt for python)#4884

Draft
melven wants to merge 4 commits into
spack:developfrom
melven:py-pyside6-add_package
Draft

py-pyside6: add package for PySide6 (Qt for python)#4884
melven wants to merge 4 commits into
spack:developfrom
melven:py-pyside6-add_package

Conversation

@melven
Copy link
Copy Markdown
Contributor

@melven melven commented May 17, 2026

No description provided.

@melven
Copy link
Copy Markdown
Contributor Author

melven commented May 17, 2026

Draft because it depends on updated and new packages from #4882 and #4883.

@melven
Copy link
Copy Markdown
Contributor Author

melven commented May 17, 2026

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app Bot commented May 17, 2026

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app Bot commented May 17, 2026

I was able to run spack style --fix for you!

spack style --fix
repos/spack_repo/builtin/packages/py_pyside6/package.py
repos/spack_repo/builtin/packages/py_qtpy/package.py
�[1;34m==> �[0mrunning ruff format
1 file reformatted, 1 file left unchanged
�[1;34m==> �[0mrunning ruff check
�[1m�[91mE501 �[0m�[1mLine too long (100 > 99)�[0m
  �[1m�[94m-->�[0m repos/spack_repo/builtin/packages/py_pyside6/package.py:44:100
   �[1m�[94m|�[0m
�[1m�[94m42 |�[0m     depends_on("py-mypy@1.15.0:", type="build")
�[1m�[94m43 |�[0m
�[1m�[94m44 |�[0m     # can also build without opengl but generates warnings. network and accessibility seem required.
   �[1m�[94m|�[0m                                                                                                    �[1m�[91m^�[0m
�[1m�[94m45 |�[0m     depends_on("qt-base@6.11: +network +accessibility +opengl")
�[1m�[94m46 |�[0m     # can also build without tools but generates warnings...
   �[1m�[94m|�[0m

�[1m�[91mE501 �[0m�[1mLine too long (103 > 99)�[0m
  �[1m�[94m-->�[0m repos/spack_repo/builtin/packages/py_pyside6/package.py:56:100
   �[1m�[94m|�[0m
�[1m�[94m54 |�[0m     def patch(self):
�[1m�[94m55 |�[0m
�[1m�[94m56 |�[0m         # shiboken include paths: misses non-qt-base paths (QtUiTools in qt-tools and Qt3D... in qt-3d)
   �[1m�[94m|�[0m                                                                                                    �[1m�[91m^^^^�[0m
�[1m�[94m57 |�[0m         additional_includes = []
�[1m�[94m58 |�[0m         if "+tools" in self.spec:
   �[1m�[94m|�[0m

�[1m�[91mE501 �[0m�[1mLine too long (103 > 99)�[0m
  �[1m�[94m-->�[0m repos/spack_repo/builtin/packages/py_pyside6/package.py:73:100
   �[1m�[94m|�[0m
�[1m�[94m71 |�[0m         filter_file(
�[1m�[94m72 |�[0m             "pyside_build.update_rpath(executables)",
�[1m�[94m73 |�[0m             "pyside_build.update_rpath(executables + pyside_build.package_libraries(destination_dir))",
   �[1m�[94m|�[0m                                                                                                    �[1m�[91m^^^^�[0m
�[1m�[94m74 |�[0m             "build_scripts/platforms/unix.py",
�[1m�[94m75 |�[0m             string=True,
   �[1m�[94m|�[0m

Found 3 errors.
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@wdconinc
Copy link
Copy Markdown
Contributor

This partly duplicates #2877 where the package is added as a dependency. But the external json files there are non-standard and the version here is preferred. Not sure if you need addons and essentials too, but it could be an opportune time to add them in this PR as well (no pressure, not a review request).

@melven
Copy link
Copy Markdown
Contributor Author

melven commented May 18, 2026

This partly duplicates #2877 where the package is added as a dependency. But the external json files there are non-standard and the version here is preferred. Not sure if you need addons and essentials too, but it could be an opportune time to add them in this PR as well (no pressure, not a review request).

So the modules marked as essential during build are all there when compiling with ~qt3d ~tools:

-- essential module Qt6Core found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Core
-- essential module Qt6Gui found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Gui
-- essential module Qt6Widgets found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Widgets
-- essential module Qt6PrintSupport found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6PrintSupport
-- essential module Qt6Sql found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Sql
-- essential module Qt6Network found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Network
-- essential module Qt6Test found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Test
-- essential module Qt6Concurrent found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Concurrent
-- optional module Qt6DBus skipped. Looked in: Qt6DBus_DIR-NOTFOUND
-- optional module Qt6Designer skipped. Looked in: Qt6Designer_DIR-NOTFOUND
-- optional module Qt6Xml found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Xml
-- optional module Qt6Help skipped. Looked in: Qt6Help_DIR-NOTFOUND
-- optional module Qt6Multimedia skipped. Looked in: Qt6Multimedia_DIR-NOTFOUND
-- optional module Qt6MultimediaWidgets skipped. Looked in: Qt6MultimediaWidgets_DIR-NOTFOUND
-- optional module Qt6OpenGL found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6OpenGL
-- optional module Qt6OpenGLWidgets found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6OpenGLWidgets

I also made +opengl optional, so one can almost build only the essential part (there is no variant to disable building QtXml in qt-base).

And I've added qt-declarative and qt-svg.

Now with +qt3d +tools +svg +declarative, it contains some of the addon parts:

-- essential module Qt6Core found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Core
-- essential module Qt6Gui found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Gui
-- essential module Qt6Widgets found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Widgets
-- essential module Qt6PrintSupport found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6PrintSupport
-- essential module Qt6Sql found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Sql
-- essential module Qt6Network found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Network
-- essential module Qt6Test found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Test
-- essential module Qt6Concurrent found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Concurrent
-- optional module Qt6DBus skipped. Looked in: Qt6DBus_DIR-NOTFOUND
-- optional module Qt6Designer skipped. Looked in: Qt6Designer_DIR-NOTFOUND
-- optional module Qt6Xml found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6Xml
-- optional module Qt6Help skipped. Looked in: Qt6Help_DIR-NOTFOUND
-- optional module Qt6Multimedia skipped. Looked in: Qt6Multimedia_DIR-NOTFOUND
-- optional module Qt6MultimediaWidgets skipped. Looked in: Qt6MultimediaWidgets_DIR-NOTFOUND
-- optional module Qt6OpenGL found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6OpenGL
-- optional module Qt6OpenGLWidgets found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-base-6.11.1-slbeidv5uausxdpo2suv6mitfcx5pf53/lib/cmake/Qt6OpenGLWidgets
-- optional module Qt6Pdf skipped. Looked in: Qt6Pdf_DIR-NOTFOUND
-- optional module Qt6PdfWidgets skipped. Looked in: Qt6PdfWidgets_DIR-NOTFOUND
-- optional module Qt6Positioning skipped. Looked in: Qt6Positioning_DIR-NOTFOUND
-- optional module Qt6Location skipped. Looked in: Qt6Location_DIR-NOTFOUND
-- optional module Qt6NetworkAuth skipped. Looked in: Qt6NetworkAuth_DIR-NOTFOUND
-- optional module Qt6Nfc skipped. Looked in: Qt6Nfc_DIR-NOTFOUND
-- optional module Qt6Qml found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-declarative-6.11.1-5czlwoyvomx6xagqnickx6m6twa3bqv7/lib/cmake/Qt6Qml
-- optional module Qt6Quick found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-declarative-6.11.1-5czlwoyvomx6xagqnickx6m6twa3bqv7/lib/cmake/Qt6Quick
-- optional module Qt6Quick3D skipped. Looked in: Qt6Quick3D_DIR-NOTFOUND
-- optional module Qt6QuickControls2 found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-declarative-6.11.1-5czlwoyvomx6xagqnickx6m6twa3bqv7/lib/cmake/Qt6QuickControls2
-- optional module Qt6CanvasPainter skipped. Looked in: Qt6CanvasPainter_DIR-NOTFOUND
-- optional module Qt6QuickTest found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-declarative-6.11.1-5czlwoyvomx6xagqnickx6m6twa3bqv7/lib/cmake/Qt6QuickTest
-- optional module Qt6QuickWidgets found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-declarative-6.11.1-5czlwoyvomx6xagqnickx6m6twa3bqv7/lib/cmake/Qt6QuickWidgets
-- optional module Qt6RemoteObjects skipped. Looked in: Qt6RemoteObjects_DIR-NOTFOUND
-- optional module Qt6Scxml skipped. Looked in: Qt6Scxml_DIR-NOTFOUND
-- optional module Qt6Sensors skipped. Looked in: Qt6Sensors_DIR-NOTFOUND
-- optional module Qt6SerialPort skipped. Looked in: Qt6SerialPort_DIR-NOTFOUND
-- optional module Qt6SerialBus skipped. Looked in: Qt6SerialBus_DIR-NOTFOUND
-- optional module Qt6StateMachine skipped. Looked in: Qt6StateMachine_DIR-NOTFOUND
-- optional module Qt6TextToSpeech skipped. Looked in: Qt6TextToSpeech_DIR-NOTFOUND
-- optional module Qt6Charts skipped. Looked in: Qt6Charts_DIR-NOTFOUND
-- optional module Qt6SpatialAudio skipped. Looked in: Qt6SpatialAudio_DIR-NOTFOUND
-- optional module Qt6Svg found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-svg-6.11.1-ci5ysixk4avbo7qiht6p5li2vo7yk4kb/lib/cmake/Qt6Svg
-- optional module Qt6SvgWidgets found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-svg-6.11.1-ci5ysixk4avbo7qiht6p5li2vo7yk4kb/lib/cmake/Qt6SvgWidgets
-- optional module Qt6DataVisualization skipped. Looked in: Qt6DataVisualization_DIR-NOTFOUND
-- optional module Qt6Graphs skipped. Looked in: Qt6Graphs_DIR-NOTFOUND
-- optional module Qt6GraphsWidgets skipped. Looked in: Qt6GraphsWidgets_DIR-NOTFOUND
-- optional module Qt6Bluetooth skipped. Looked in: Qt6Bluetooth_DIR-NOTFOUND
-- optional module Qt6UiTools found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-tools-6.11.1-5wzbz4mgriiawe6x5pjgf4f66jtqtveb/lib/cmake/Qt6UiTools
-- optional module Qt6WebChannel skipped. Looked in: Qt6WebChannel_DIR-NOTFOUND
-- optional module Qt6WebEngineCore skipped. Looked in: Qt6WebEngineCore_DIR-NOTFOUND
-- optional module Qt6WebEngineWidgets skipped. Looked in: Qt6WebEngineWidgets_DIR-NOTFOUND
-- optional module Qt6WebEngineQuick skipped. Looked in: Qt6WebEngineQuick_DIR-NOTFOUND
-- optional module Qt6WebSockets skipped. Looked in: Qt6WebSockets_DIR-NOTFOUND
-- optional module Qt6HttpServer skipped. Looked in: Qt6HttpServer_DIR-NOTFOUND
-- optional module Qt63DCore found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-3d-6.11.1-ado3z4ckvt3stubxm2ztwgvd7hei3cb6/lib/cmake/Qt63DCore
-- optional module Qt63DRender found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-3d-6.11.1-ado3z4ckvt3stubxm2ztwgvd7hei3cb6/lib/cmake/Qt63DRender
-- optional module Qt63DInput found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-3d-6.11.1-ado3z4ckvt3stubxm2ztwgvd7hei3cb6/lib/cmake/Qt63DInput
-- optional module Qt63DLogic found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-3d-6.11.1-ado3z4ckvt3stubxm2ztwgvd7hei3cb6/lib/cmake/Qt63DLogic
-- optional module Qt63DAnimation found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-3d-6.11.1-ado3z4ckvt3stubxm2ztwgvd7hei3cb6/lib/cmake/Qt63DAnimation
-- optional module Qt63DExtras found (). Looked in: /home/zoel_ml/spack_tmp/opt/spack/linux-cascadelake/qt-3d-6.11.1-ado3z4ckvt3stubxm2ztwgvd7hei3cb6/lib/cmake/Qt63DExtras
-- Could NOT find Qt6RemoteObjects (missing: Qt6RemoteObjects_DIR)

Some are currently not enabled in qt-tools (like the designer) in my build.

And several others have no suitable qt-package in spack so far. But I won't manage to add / check all these ;)

@melven
Copy link
Copy Markdown
Contributor Author

melven commented May 18, 2026

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app Bot commented May 18, 2026

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app Bot commented May 18, 2026

I was able to run spack style --fix for you!

spack style --fix
repos/spack_repo/builtin/packages/py_pyside6/package.py
repos/spack_repo/builtin/packages/py_qtpy/package.py
�[1;34m==> �[0mrunning ruff format
2 files left unchanged
�[1;34m==> �[0mrunning ruff check
�[1m�[91mE501 �[0m�[1mLine too long (103 > 99)�[0m
  �[1m�[94m-->�[0m repos/spack_repo/builtin/packages/py_pyside6/package.py:60:100
   �[1m�[94m|�[0m
�[1m�[94m58 |�[0m     def patch(self):
�[1m�[94m59 |�[0m
�[1m�[94m60 |�[0m         # shiboken include paths: misses non-qt-base paths (QtUiTools in qt-tools and Qt3D... in qt-3d)
   �[1m�[94m|�[0m                                                                                                    �[1m�[91m^^^^�[0m
�[1m�[94m61 |�[0m         additional_includes = []
�[1m�[94m62 |�[0m         if "+tools" in self.spec:
   �[1m�[94m|�[0m

�[1m�[91mE501 �[0m�[1mLine too long (103 > 99)�[0m
  �[1m�[94m-->�[0m repos/spack_repo/builtin/packages/py_pyside6/package.py:83:100
   �[1m�[94m|�[0m
�[1m�[94m81 |�[0m         filter_file(
�[1m�[94m82 |�[0m             "pyside_build.update_rpath(executables)",
�[1m�[94m83 |�[0m             "pyside_build.update_rpath(executables + pyside_build.package_libraries(destination_dir))",
   �[1m�[94m|�[0m                                                                                                    �[1m�[91m^^^^�[0m
�[1m�[94m84 |�[0m             "build_scripts/platforms/unix.py",
�[1m�[94m85 |�[0m             string=True,
   �[1m�[94m|�[0m

Found 2 errors.
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I wasn't able to make any further changes, but please see the message above for remaining issues you can fix locally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants