diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-05-05 12:19:16 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-05-05 18:54:42 +0000 |
commit | c13f363128e7843c0611a8963e4632c9701cc6fd (patch) | |
tree | 0058f291ef429b952c4500922b6e93b2b2f97443 /sources | |
parent | cbbfc196ca8905804ad4c8cbfd0c83c2c80d8d8c (diff) |
Turn off numpy support in libpyside by default
Add a configure parameter for it and mark it as experimental.
It has been found to:
- break cx_freeeze
- Cause embedding applications to fail to load with "undefined symbol: PyExc_RecursionError"
Task-number: PYSIDE-1540
Task-number: PYSIDE-1503
Task-number: PYSIDE-1455
Change-Id: I72fa4a3324a37eb996c42b83dce55fe1990b6fc3
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 36431b071095b8999347df87621bf23ffcc2ac3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/libpyside/CMakeLists.txt | 6 | ||||
-rw-r--r-- | sources/pyside6/tests/QtGui/qpainter_test.py | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/CMakeLists.txt b/sources/pyside6/libpyside/CMakeLists.txt index 78be0c082..90f333e5d 100644 --- a/sources/pyside6/libpyside/CMakeLists.txt +++ b/sources/pyside6/libpyside/CMakeLists.txt @@ -95,10 +95,14 @@ target_include_directories(pyside6 PUBLIC $<INSTALL_INTERFACE:include/PySide6> ) -if (NOT "${NUMPY_INCLUDE_DIR}" STREQUAL "") +if (PYSIDE_NUMPY_SUPPORT AND NOT "${NUMPY_INCLUDE_DIR}" STREQUAL "") + message(STATUS "Enabling experimental numpy support in libpyside.") target_include_directories(pyside6 PRIVATE ${NUMPY_INCLUDE_DIR}) target_compile_definitions(pyside6 PRIVATE -DHAVE_NUMPY PRIVATE -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION) + +else() + message(STATUS "Disabled experimental numpy support in libpyside.") endif() target_link_libraries(pyside6 diff --git a/sources/pyside6/tests/QtGui/qpainter_test.py b/sources/pyside6/tests/QtGui/qpainter_test.py index 2a9db8598..a099e9df8 100644 --- a/sources/pyside6/tests/QtGui/qpainter_test.py +++ b/sources/pyside6/tests/QtGui/qpainter_test.py @@ -116,7 +116,8 @@ class QPainterDrawText(UsesQGuiApplication): QPoint(20.0, 10.0), QPoint(80.0, 30.0), QPoint(90.0, 70.0)]) - if HAVE_NUMPY: + # FIXME: Activate once libpyside numpy support is on by default + if False and HAVE_NUMPY: x = np.array([10.0, 20.0, 80.0, 90.0]) y = np.array([80.0, 10.0, 30.0, 70.0]) self.painter.drawPointsNp(x, y) |