Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fortress: explicitly set python version #2540

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Formula/ignition-gazebo6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class IgnitionGazebo6 < Formula
url "https://osrf-distributions.s3.amazonaws.com/ign-gazebo/releases/ignition-gazebo6-6.16.0.tar.bz2"
sha256 "1e61148e8b49a5a20f4cac1e116ce5c4d8de3718a1d26e41a1cec394ce5ea9e4"
license "Apache-2.0"
revision 1
revision 2

head "https://github.com/gazebosim/gz-sim.git", branch: "ign-gazebo6"

Expand Down Expand Up @@ -44,11 +44,15 @@ def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_TESTING=OFF"
cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}"
cmake_args << "-DPython3_EXECUTABLE=#{which("python3")}"

mkdir "build" do
system "cmake", "..", *cmake_args
system "make", "install"
end

(lib/"python3.11/site-packages").install Dir[lib/"python/*"]
rmdir prefix/"lib/python"
end

test do
Expand Down Expand Up @@ -134,5 +138,7 @@ def install
# check for Xcode frameworks in bottle
cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}"
system cmd_not_grep_xcode
# check python import
system Formula["[email protected]"].opt_bin/"python3.11", "-c", "import ignition.gazebo"
end
end
7 changes: 7 additions & 0 deletions Formula/ignition-math6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class IgnitionMath6 < Formula
url "https://osrf-distributions.s3.amazonaws.com/ign-math/releases/ignition-math6-6.15.1.tar.bz2"
sha256 "a9e96a4e28d7d92d4d054cdae7cef28f1d8397b72433398bfc68855956531170"
license "Apache-2.0"
revision 1

head "https://github.com/gazebosim/gz-math.git", branch: "ign-math6"

Expand All @@ -25,12 +26,16 @@ def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_TESTING=OFF"
cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}"
cmake_args << "-DPython3_EXECUTABLE=#{which("python3")}"

# Use build folder
mkdir "build" do
system "cmake", "..", *cmake_args
system "make", "install"
end

(lib/"python3.11/site-packages").install Dir[lib/"python/*"]
rmdir prefix/"lib/python"
end

test do
Expand Down Expand Up @@ -67,5 +72,7 @@ def install
# check for Xcode frameworks in bottle
cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}"
system cmd_not_grep_xcode
# check python import
system Formula["[email protected]"].opt_bin/"python3.11", "-c", "import ignition.math"
end
end