Tests: test availability of new bundled Python libraries
Differential Revision: https://developer.blender.org/D16733
This commit is contained in:
parent
b3f664f8fb
commit
589cbbf0e3
|
@ -80,7 +80,7 @@ add_blender_test(
|
||||||
|
|
||||||
add_blender_test(
|
add_blender_test(
|
||||||
script_bundled_modules
|
script_bundled_modules
|
||||||
--python ${CMAKE_CURRENT_LIST_DIR}/bl_bundled_modules.py
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_bundled_modules.py -- --inside-blender
|
||||||
)
|
)
|
||||||
|
|
||||||
# test running operators doesn't segfault under various conditions
|
# test running operators doesn't segfault under various conditions
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
# Test that modules we ship with our Python installation are available
|
# Test that modules we ship with our Python installation are available,
|
||||||
|
# both for Blender itself and the bundled Python executable.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
app = "Blender" if sys.argv[-1] == "--inside-blender" else "Python"
|
||||||
|
sys.stderr.write(f"Testing bundled modules in {app} executable.\n")
|
||||||
|
|
||||||
|
# General purpose modules.
|
||||||
import bz2
|
import bz2
|
||||||
import certifi
|
import certifi
|
||||||
import ctypes
|
import ctypes
|
||||||
|
@ -14,3 +23,16 @@ import ssl
|
||||||
import urllib3
|
import urllib3
|
||||||
import zlib
|
import zlib
|
||||||
import zstandard
|
import zstandard
|
||||||
|
|
||||||
|
# VFX platform modules.
|
||||||
|
from pxr import Usd
|
||||||
|
import MaterialX
|
||||||
|
import OpenImageIO
|
||||||
|
import PyOpenColorIO
|
||||||
|
import pyopenvdb
|
||||||
|
|
||||||
|
# Test modules in bundled Python standalone executable.
|
||||||
|
if app == "Blender":
|
||||||
|
script_filepath = os.path.abspath(__file__)
|
||||||
|
proc = subprocess.Popen([sys.executable, script_filepath])
|
||||||
|
sys.exit(proc.wait())
|
||||||
|
|
Loading…
Reference in New Issue