2022-02-10 22:07:11 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2020-02-11 09:15:31 +00:00
|
|
|
|
2023-01-09 12:15:20 +00:00
|
|
|
# Test that modules we ship with our Python installation are available,
|
|
|
|
# both for Blender itself and the bundled Python executable.
|
2020-02-11 09:15:31 +00:00
|
|
|
|
2023-01-09 12:15:20 +00:00
|
|
|
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.
|
2020-02-11 09:15:31 +00:00
|
|
|
import bz2
|
2021-10-21 16:31:17 +00:00
|
|
|
import certifi
|
2020-04-28 10:42:40 +00:00
|
|
|
import ctypes
|
2021-10-21 16:31:17 +00:00
|
|
|
import cython
|
2020-02-11 09:15:31 +00:00
|
|
|
import lzma
|
|
|
|
import numpy
|
2021-10-21 16:31:17 +00:00
|
|
|
import requests
|
2020-02-11 09:15:31 +00:00
|
|
|
import sqlite3
|
|
|
|
import ssl
|
2021-10-21 16:31:17 +00:00
|
|
|
import urllib3
|
2020-02-11 09:15:31 +00:00
|
|
|
import zlib
|
2021-10-21 16:31:17 +00:00
|
|
|
import zstandard
|
2023-01-09 12:15:20 +00:00
|
|
|
|
|
|
|
# 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())
|