mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
build-all: use find_spec to check aqt
This commit is contained in:
+2
-3
@@ -110,6 +110,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
|
import importlib.util
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
@@ -985,9 +986,7 @@ def install_qt6() -> str:
|
|||||||
|
|
||||||
os.makedirs(qt_install_root, exist_ok=True)
|
os.makedirs(qt_install_root, exist_ok=True)
|
||||||
|
|
||||||
try:
|
if importlib.util.find_spec("aqt") is None:
|
||||||
import aqt # ty:ignore[unresolved-import]
|
|
||||||
except ModuleNotFoundError:
|
|
||||||
logger.error(
|
logger.error(
|
||||||
"Could not find an existing Qt6 install, so aqtinstall is needed to fetch it automatically. "
|
"Could not find an existing Qt6 install, so aqtinstall is needed to fetch it automatically. "
|
||||||
"Install the `aqtinstall` PyPI package or set QT_DIR."
|
"Install the `aqtinstall` PyPI package or set QT_DIR."
|
||||||
|
|||||||
Reference in New Issue
Block a user