diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-05-10 08:00:02 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-05-17 16:46:59 +0200 |
| commit | 9a2a9bae00003f7dc0cea782bb10775aa25c8933 (patch) | |
| tree | 382566d7cc3b0c09b058569e348b707cf8faf732 /build_scripts/options.py | |
| parent | e6082b18b904569fc946b9f36fc995684463267f (diff) | |
Enable numpy support by default
This effectively undoes 36431b071095b8999347df87621bf23ffcc2ac3d
which disabled numpy support in libpyside due to
- break cx_freeeze
- Cause embedding applications to fail to load with "undefined symbol: PyExc_RecursionError"
Auto-detection along with --enable/--disable options is introduced
instead.
All numpy code is now located in libshiboken and it cleanly recovers
when numpy cannot be found on the target system. The
PyExc_RecursionError issue could not longer be reproduced.
[ChangeLog][PySide6] Numpy support is now enabled by default.
Task-number: PYSIDE-1924
Change-Id: I0fdb3612471971afa49ac3141845cf5d6dbfa7e0
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts/options.py')
| -rw-r--r-- | build_scripts/options.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/build_scripts/options.py b/build_scripts/options.py index 80b92e887..5e5603f9c 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -250,7 +250,10 @@ class DistUtilsCommandMixin(object): ('qt-src-dir=', None, 'Qt source directory'), ('no-qt-tools', None, 'Do not copy the Qt tools'), ('no-size-optimization', None, 'Turn off size optimization for PySide6 binaries'), - ('pyside-numpy-support', None, 'libpyside: Add (experimental) numpy support'), + # Default is auto-detected by PysideBuild._enable_numpy() + ('pyside-numpy-support', None, 'libpyside: Add numpy support (deprecated)'), + ('enable-numpy-support', None, 'Enable numpy support'), + ('disable-numpy-support', None, 'Disable numpy support'), ('internal-cmake-install-dir-query-file-path=', None, 'Path to file where the CMake install path of the project will be saved'), @@ -310,6 +313,8 @@ class DistUtilsCommandMixin(object): self.no_qt_tools = False self.no_size_optimization = False self.pyside_numpy_support = False + self.enable_numpy_support = False + self.disable_numpy_support = False self.plat_name = None self.internal_cmake_install_dir_query_file_path = None self._per_command_mixin_options_finalized = False @@ -471,6 +476,8 @@ class DistUtilsCommandMixin(object): OPTION['QT_SRC'] = self.qt_src_dir OPTION['NO_QT_TOOLS'] = self.no_qt_tools OPTION['NO_OVERRIDE_OPTIMIZATION_FLAGS'] = self.no_size_optimization + OPTION['DISABLE_NUMPY_SUPPORT'] = self.disable_numpy_support + OPTION['ENABLE_NUMPY_SUPPORT'] = self.enable_numpy_support OPTION['PYSIDE_NUMPY_SUPPORT'] = self.pyside_numpy_support if not self._extra_checks(): |
