resty: rewrite shebang with `use_python_from_path`

Closes Homebrew/homebrew-core#119096

Closes #119740.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Michael Cho 2023-01-04 01:33:52 -08:00 committed by BrewTestBot
parent 3ce3aa4b50
commit 0572ca5d67
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 4 additions and 5 deletions

View File

@ -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