diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-05-14 10:16:55 +0200 |
|---|---|---|
| committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-06-03 17:08:41 +0200 |
| commit | 217dcaed583a8df0db5edd43bafa3cf3bbaeda90 (patch) | |
| tree | ffd38a048a7bfbd956df54c646f66657f680b5f7 /build_scripts/main.py | |
| parent | eeb286ee7c943ff8ce612719cdbddf7b871d2442 (diff) | |
Android Deployment: Build wheels with macOS host
- Additionally, also move setting Python_SOABI manually for Android to
where FindPython CMake module is called. This also aids in naming the
wheel correctly.
Pick-to: 6.7
Task-number: PYSIDE-2766
Change-Id: I73c089d31e2ee629f3ed676965fca27d53882110
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts/main.py')
| -rw-r--r-- | build_scripts/main.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index 9a8d4fb3f..dac476cdb 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -508,7 +508,11 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin): log.info("-" * 3) if sys.platform == 'win32': log.info(f"OpenSSL dll directory: {OPTION['OPENSSL']}") - if sys.platform == 'darwin': + # for cross-compilation it is possible to use a macOS host, but + # pyside_macos_deployment_target is not relevant for the target. + # The only exception here is when we are trying to cross-compile from intel mac to m1 mac. + # This case is not supported yet. + if sys.platform == 'darwin' and not self.is_cross_compile: pyside_macos_deployment_target = (macos_pyside_min_deployment_target()) log.info(f"MACOSX_DEPLOYMENT_TARGET set to: {pyside_macos_deployment_target}") log.info("=" * 30) @@ -745,7 +749,9 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin): cmake_cmd += platform_cmake_options() - if sys.platform == 'darwin': + # for a macOS host, cross-compilation is possible, but for the host system as such + # we only build shiboken. Hence the following code can be skipped. + if sys.platform == 'darwin' and not self.is_cross_compile: if OPTION["MACOS_ARCH"]: # also tell cmake which architecture to use cmake_cmd.append(f"-DCMAKE_OSX_ARCHITECTURES:STRING={OPTION['MACOS_ARCH']}") |
