While adding support for cross compiling options I noticed the current
setup of the build process could be improved.
Since the wheel-split changes we currently generate three packages:
- Shiboken generator
- Shiboken (python module)
- PySide (python module)
Which makes sense, but sadly we cannot build Shiboken separately
in a proper way, i.e.: building shiboken generator also builds the python
module, and some Linux distributions that are maintaining the separate
packages are manually removing the files that are not interesting.
For example, Arch Linux's packages.
from which you can see the following while building shiboken:
When they build shiboken 2 (the generator), they need to remove all the
shared libraries that are generated too:
and then when building the python module, they need to remove the
shiboken generator files:
This is crucial for cross compiling purposes because one needs to build
the generator on the Host, and then build the python module for the
Target but using the Host generator and a specified sysroot.
At the moment the CMake configuration to build shiboken needs some
love, but a split is not straightforward because many sub-directories
are being built:
I believe completely separating the building process of Shiboken generator
and Shiboken module (python) is crucial to achieve any kind of cross compiling
1. Building Shiboken generator should contain:
- doc (only from ApiExtractor)
- tests (without the shibokenmodule)
2. Building Shiboken module (python) should contain
- doc (only from shibokenmodule)
- tests (only the shibokenmodule one)
Notice that for step 2. we would need a mechanism to specify the
path to the generator to be used.
The data directory contains CMake Config files that will need to be
split too to properly found the generator and the module as separate
We could even write a third one that include boths to not alter the
current build process.
|For Gerrit Dashboard: PYSIDE-1033|
|373445,97||CMake: shiboken: Add support for cross-building||dev||pyside/pyside-setup||Status: NEW||0||0|
|373733,77||CMake: Create new Shiboken6Tools CMake package||dev||pyside/pyside-setup||Status: NEW||+2||0|
|374068,129||WIP: setup.py: Add support for cross-building||dev||pyside/pyside-setup||Status: NEW||-2||0|
|381116,84||WIP: coin: Try to cross-compile in CI||dev||pyside/pyside-setup||Status: NEW||-2||0|