From b87deff958803c42132dc1195a3a1a84f07e1f56 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 21 Nov 2024 13:01:48 -0500 Subject: [PATCH] iconsur: add dependency for xcodebuild --- Formula/i/iconsur.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/i/iconsur.rb b/Formula/i/iconsur.rb index 37d591be53722..76a4250d7f580 100644 --- a/Formula/i/iconsur.rb +++ b/Formula/i/iconsur.rb @@ -26,6 +26,7 @@ class Iconsur < Formula # this causes issues if a user has Homebrew Python installed (EXTERNALLY-MANAGED). # We instead prepare a virtualenv with all missing packages. on_monterey :or_newer do + depends_on xcode: :build # for xcodebuild depends_on "python@3.13" end @@ -43,12 +44,15 @@ def install system "npm", "install", *std_npm_args if MacOS.version >= :monterey + # help `pyobjc-framework-cocoa` run xcodebuild when xcode-select is set to CLT + ENV["DEVELOPER_DIR"] = ENV["HOMEBREW_DEVELOPER_DIR"] + venv = virtualenv_create(libexec/"venv", "python3.13") venv.pip_install resources - bin.install Dir["#{libexec}/bin/*"] + bin.install libexec.glob("bin/*") bin.env_script_all_files libexec/"bin", PATH: "#{venv.root}/bin:${PATH}" else - bin.install_symlink Dir["#{libexec}/bin/*"] + bin.install_symlink libexec.glob("bin/*") end end