Skip to content

Commit

Permalink
Helper script fix
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Jeandet <[email protected]>
  • Loading branch information
jeandet committed Jun 2, 2024
1 parent 4d1f68c commit 9745289
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions SciQLopPlots/bindings/helper_scripts/shiboken-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}']

Expand Down

0 comments on commit 9745289

Please sign in to comment.