diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 20863d9..66e7ee2 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -67,8 +67,7 @@ jobs: pip install "aqtinstall" && aqt install-qt -O "${{ env.GITHUB_WORKSPACE }}/Qt" mac desktop ${{ env.PYSIDE_VERSION }} CIBW_BEFORE_BUILD_LINUX: > - dnf install -y /usr/lib64/libxkbcommon.so.0 /usr/lib64/libxslt.so.1 clang - && dnf remove -y /usr/bin/llvm-config + dnf install -y /usr/lib64/libxkbcommon.so.0 /usr/lib64/libxslt.so.1 clang /usr/bin/llvm-config && pip install "aqtinstall" && aqt install-qt -O "${{ env.GITHUB_WORKSPACE }}/Qt" linux desktop ${{ env.PYSIDE_VERSION }} CIBW_REPAIR_WHEEL_COMMAND_LINUX: > auditwheel repair -w {dest_dir} --exclude libpyside6.abi3.so.6.7 --exclude libshiboken6.abi3.so.6.7 --exclude libQt6Core.so.6 --exclude libQt6Widgets.so.6 --exclude libQt6Gui.so.6 --exclude libpyside6qml.abi3.so.6.7 --exclude libGLX.so.0 --exclude libOpenGL.so.0 --exclude libxcb.so.1 --only-plat --plat manylinux_2_28_x86_64 {wheel} diff --git a/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py b/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py index a10fc5f..610a448 100644 --- a/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py +++ b/SciQLopPlots/bindings/helper_scripts/shiboken-gen.py @@ -41,27 +41,30 @@ def cpp_flags(build_dir, ref_build_target): '--generator-set=shiboken'] if 'linux' in platform.system().lower(): - if os.environ.get('AUDITWHEEL_PLAT', '') == 'manylinux_2_28_x86_64': - gcc_found = False - for v in reversed(range(11,14)): - prefix = f'/opt/rh/gcc-toolset-{v}/root/usr' - if os.path.exists(prefix): - shiboken_constant_args += [ - f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/../../../../include/c++/{v}", - f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/../../../../include/c++/{v}/x86_64-redhat-linux", - f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/../../../../include/c++/{v}/backward", - f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/include", - f"-I/opt/rh/gcc-toolset-13/root/usr/include", - f"-I/usr/local/include", - f"-I/usr/include", - ] - 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 + #if os.environ.get('AUDITWHEEL_PLAT', '') == 'manylinux_2_28_x86_64': + # gcc_found = False + # for v in reversed(range(11,14)): + # prefix = f'/opt/rh/gcc-toolset-{v}/root/usr' + # if os.path.exists(prefix): + # shiboken_constant_args += [ + # f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/../../../../include/c++/{v}", + # f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/../../../../include/c++/{v}/x86_64-redhat-linux", + # f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/../../../../include/c++/{v}/backward", + # f"-I/opt/rh/gcc-toolset-{v}/root/usr/lib/gcc/x86_64-redhat-linux/{v}/include", + # f"-I/opt/rh/gcc-toolset-13/root/usr/include", + # f"-I/usr/local/include", + # f"-I/usr/include", + # ] + # gcc_found = True + # shiboken_constant_args += ['--compiler=g++'] + # break + 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}']