Skip to content

Commit

Permalink
[email protected]_py310: rebottle for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatch committed May 5, 2024
1 parent 1f456b8 commit 6760f8f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Formula/[email protected]_py310.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def install
rpaths = if OS.mac?
shiboken2_module = prefix/Language::Python.site_packages(python3)/"shiboken2"
[rpath, rpath(source: shiboken2_module)]
elsif OS.linux?
shiboken2_module = prefix/Language::Python.site_packages(python3)/"shiboken2"
[rpath, rpath(source: shiboken2_module)]
end

ENV.append_path "CMAKE_PREFIX_PATH", Formula["qt@5"].opt_lib
Expand All @@ -43,14 +46,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["[email protected]"].opt_bin/"python3.10"
python_lib = Formula["[email protected]"].opt_lib/"libpython3.10.dylib"
py_exe = Formula["[email protected]"].opt_bin/"python3.10"

py_lib = if OS.mac?
Formula["[email protected]"].opt_lib/"libpython3.10.dylib"
else
Formula["[email protected]"].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(";")}"

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}",
Expand Down

0 comments on commit 6760f8f

Please sign in to comment.