pyenv with PyQt5 in other enviroment workaround
@@ -6,7 +6,7 @@ for styling svg elements using qss
import os
import re
import shutil
-from subprocess import run
+from subprocess import check_call, CalledProcessError
from typing import Dict, List, Tuple
from ..utils.theme import palettes as _palettes
@@ -168,9 +168,9 @@ def build_pyqt_resources(out_path: str, overwrite: bool = False) -> str:
# then convert it to a python file
try:
- run(['pyrcc5', '-o', out_path, qrc_path])
- except FileNotFoundError:
- run(['pyside2-rcc', '-o', out_path, qrc_path])
+ check_call(['pyrcc5', '-o', out_path, qrc_path])
+ except (FileNotFoundError, CalledProcessError):
+ check_call(['pyside2-rcc', '-o', out_path, qrc_path])
# make sure we import from qtpy
with open(out_path, "rt") as fin:
