From 0572ca5d670c22c08ba3e6d0bacfa1d8301c7cfb Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 4 Jan 2023 01:33:52 -0800 Subject: [PATCH] resty: rewrite shebang with `use_python_from_path` Closes Homebrew/homebrew-core#119096 Closes #119740. Signed-off-by: Patrick Linnane Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/resty.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Formula/resty.rb b/Formula/resty.rb index 503722e714a..636ce1918c2 100644 --- a/Formula/resty.rb +++ b/Formula/resty.rb @@ -19,10 +19,7 @@ class Resty < Formula end uses_from_macos "perl" - - on_linux do - depends_on "python@3.10" - end + uses_from_macos "python" conflicts_with "nss", because: "both install `pp` binaries" @@ -46,7 +43,9 @@ class Resty < Formula bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) bin.install "pypp" - rewrite_shebang detected_python_shebang, bin/"pypp" if OS.linux? + if !OS.mac? || MacOS.version >= :monterey + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"pypp" + end end def caveats