diff options
author | Shyamnath Premnadh <[email protected]> | 2025-07-10 16:31:24 +0200 |
---|---|---|
committer | Shyamnath Premnadh <[email protected]> | 2025-08-15 13:48:23 +0200 |
commit | a377a3b253b6f584384ad6e22ca38f115b11fc6d (patch) | |
tree | 01bfacc7853b2462d1e0c516a4d2ffa84a07023c /build_scripts/platforms/unix.py | |
parent | a62699da1428df57584f82720055585782a63d49 (diff) |
Shiboken6Tools: Use shiboken6-generator from CMake easily
- Inspecting the `samplebinding` example, much of the code to
effectively call `shiboken6-generator` can be moved into CMake
function `shiboken_generator_create_binding` and shipped with
`Shiboken6Tools` cmake package enabling users to
easily use `shiboken6-generator` in their CMake projects.
This also helps to get rid of the `pyside_config.py` script which
is used to query certain required paths.
- This `Shiboken6Tools` CMake package is packaged with the
`shiboken6-generator` wheel and can be used easily in CMake projects
by using the `find_package(Shiboken6Tools)` command by adding the
Python site-packages directory to the CMake module path.
- The `shiboken6-generator` path installed into the Python site-packages
is different from the one used by the consecutive setup.py build/
super project build. Hence, we create a new export set
`Shiboken6ToolsWheelTargets` just for the wheel package. When
copied into `package_for_wheels` this export set is used.
- Add a special condition to the `Shiboken6ToolsConfig.cmake` file
to skip the dependency checking when building PySide which would
otherwise lead to a circular dependency.
Task-number: PYSIDE-3138
Change-Id: I199b8d9fe743adee4e3b12e8a7e1ad01f3c277de
Reviewed-by: Alexandru Croitor <[email protected]>
Diffstat (limited to 'build_scripts/platforms/unix.py')
-rw-r--r-- | build_scripts/platforms/unix.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py index 54aa265db..59c63fda3 100644 --- a/build_scripts/platforms/unix.py +++ b/build_scripts/platforms/unix.py @@ -257,10 +257,23 @@ def prepare_packages_posix(pyside_build, _vars, cross_build=False): pyside_build.prepare_standalone_clang(is_win=False) # Copy CMake config files - if config.is_internal_shiboken_module_build() or config.is_internal_pyside_build(): + if config.is_internal_shiboken_generator_build(): + # Copy Shiboken6Tools CMake package for generator + copy_cmake_config_dirs( + _vars["install_dir"], _vars["st_build_dir"], + _vars["st_package_name"], "Shiboken6Tools" + ) + elif config.is_internal_shiboken_module_build(): + # Copy Shiboken6 CMake package for module + copy_cmake_config_dirs( + _vars["install_dir"], _vars["st_build_dir"], + _vars["st_package_name"], "Shiboken6" + ) + elif config.is_internal_pyside_build(): + # Copy PySide6 CMake package copy_cmake_config_dirs( _vars["install_dir"], _vars["st_build_dir"], - _vars["st_package_name"], _vars["cmake_package_name"] + _vars["st_package_name"], "PySide6" ) # Update rpath to $ORIGIN |