From 89ee863a4f41f0793837afbc84ff451010c1d0ea Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 4 May 2024 23:09:05 -0500 Subject: [PATCH] shiboken2@5.15.11_py310: rebottle for linux --- Formula/shiboken2@5.15.11_py310.rb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Formula/shiboken2@5.15.11_py310.rb b/Formula/shiboken2@5.15.11_py310.rb index 01c88243..24a8c150 100644 --- a/Formula/shiboken2@5.15.11_py310.rb +++ b/Formula/shiboken2@5.15.11_py310.rb @@ -27,10 +27,6 @@ class Shiboken2AT51511Py310 < Formula uses_from_macos "libxml2" uses_from_macos "libxslt" - def python3 - "python3.10" - end - def install rpaths = if OS.mac? shiboken2_module = prefix/Language::Python.site_packages(python3)/"shiboken2" @@ -43,14 +39,20 @@ def install cmake_args = std_cmake_args # NOTE: ipatch, build will fail if using `python3` cmake requires major+minor ie. `python3.10` - python_executable = Formula["python@3.10"].opt_bin/"python3.10" - python_lib = Formula["python@3.10"].opt_lib/"libpython3.10.dylib" + py_exe = Formula["python@3.10"].opt_bin/"python3.10" + + py_lib = if OS.mac? + Formula["python@3.10"].opt_lib/"libpython3.10.dylib" + else + Formula["python@3.10"].opt_lib/"libpython3.10.so" + end + + cmake_args << "-DPYTHON_EXECUTABLE=#{py_exe}" + cmake_args << "-DPYTHON_LIBRARY=#{py_lib}" - cmake_args << "-DPYTHON_EXECUTABLE=#{python_executable}" - cmake_args << "-DPYTHON_LIBRARY=#{python_lib}" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" if OS.mac? system "cmake", "-S", "./sources/shiboken2", "-B", "build", - "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", "-DFORCE_LIMITED_API=no", "-DLLVM_CONFIG=#{Formula["llvm@15"].opt_bin}/llvm-config", "-DCMAKE_LIBRARY_PATH=#{Formula["llvm@15"].opt_lib}",