[Bf-blender-cvs] [757da616067] master: Fix T68243: Python sqlite module not working on macOS

Brecht Van Lommel noreply at git.blender.org
Tue Feb 11 10:35:10 CET 2020


Commit: 757da616067376116f831be3e9aa6bb77ef998be
Author: Brecht Van Lommel
Date:   Tue Feb 11 10:15:31 2020 +0100
Branches: master
https://developer.blender.org/rB757da616067376116f831be3e9aa6bb77ef998be

Fix T68243: Python sqlite module not working on macOS

===================================================================

M	build_files/build_environment/cmake/sqlite.cmake
M	tests/python/CMakeLists.txt
A	tests/python/bl_bundled_modules.py

===================================================================

diff --git a/build_files/build_environment/cmake/sqlite.cmake b/build_files/build_environment/cmake/sqlite.cmake
index 647e50b315a..9fa2fa7c708 100644
--- a/build_files/build_environment/cmake/sqlite.cmake
+++ b/build_files/build_environment/cmake/sqlite.cmake
@@ -19,8 +19,10 @@
 set(SQLITE_CONFIGURE_ENV echo .)
 set(SQLITE_CONFIGURATION_ARGS)
 
-if(UNIX AND NOT APPLE)
-  set(SQLITE_LDFLAGS -Wl,--as-needed)
+if(UNIX)
+  if(NOT APPLE)
+    set(SQLITE_LDFLAGS -Wl,--as-needed)
+  endif()
   set(SQLITE_CFLAGS
     "-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
     -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index b5af3e14237..f287ba5ed02 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -79,6 +79,11 @@ add_blender_test(
   --python ${CMAKE_CURRENT_LIST_DIR}/bl_load_py_modules.py
 )
 
+add_blender_test(
+  script_bundled_modules
+  --python ${CMAKE_CURRENT_LIST_DIR}/bl_bundled_modules.py
+)
+
 # test running operators doesn't segfault under various conditions
 if(USE_EXPERIMENTAL_TESTS)
   add_blender_test(
diff --git a/tests/python/bl_bundled_modules.py b/tests/python/bl_bundled_modules.py
new file mode 100644
index 00000000000..6f757184e7b
--- /dev/null
+++ b/tests/python/bl_bundled_modules.py
@@ -0,0 +1,30 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+# Test that modules we ship with our Python installation are available
+
+import bz2
+import cffi
+import lzma
+import numpy
+import sqlite3
+import ssl
+import zlib
+



More information about the Bf-blender-cvs mailing list