From 97452897c4e390d82bce43dea7d6126c019ca460 Mon Sep 17 00:00:00 2001 From: Alexis Jeandet Date: Sun, 2 Jun 2024 22:56:57 +0200 Subject: [PATCH] Helper script fix Signed-off-by: Alexis Jeandet --- SciQLopPlots/bindings/helper_scripts/shiboken-gen.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py b/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py index a10fc5f..a2907f5 100644 --- a/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py +++ b/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py @@ -58,10 +58,13 @@ def cpp_flags(build_dir, ref_build_target): gcc_found = True shiboken_constant_args += ['--compiler=g++'] break - llvm_dir = subprocess.run(['llvm-config', '--prefix'], check=True, stdout=subprocess.PIPE) - if llvm_dir.returncode == 0: - llvm_dir = llvm_dir.stdout.decode().strip() - env['LLVM_INSTALL_DIR'] = llvm_dir + try: + llvm_dir = subprocess.run(['llvm-config', '--prefix'], check=True, stdout=subprocess.PIPE) + if llvm_dir.returncode == 0: + llvm_dir = llvm_dir.stdout.decode().strip() + env['LLVM_INSTALL_DIR'] = llvm_dir + except FileNotFoundError: + pass cmd = [args.shiboken, args.input_header, args.input_xml ] + shiboken_constant_args + cpp_flags(args.build_directory, args.ref_build_target) + [ f'--typesystem-paths={args.typesystem_paths}', f'--output-directory={args.output_directory}']