From ee20afa906a1e0240589090595e31f93446b5544 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 26 Aug 2023 21:08:06 -0400 Subject: [PATCH 1/2] tccutil 1.2.13 Signed-off-by: Rui Chen tccutil: update test Signed-off-by: Rui Chen --- Formula/t/tccutil.rb | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/Formula/t/tccutil.rb b/Formula/t/tccutil.rb index ef327983784bb..418bf7794febd 100644 --- a/Formula/t/tccutil.rb +++ b/Formula/t/tccutil.rb @@ -1,8 +1,10 @@ class Tccutil < Formula + include Language::Python::Shebang + desc "Utility to modify the macOS Accessibility Database (TCC.db)" homepage "https://github.com/jacobsalmela/tccutil" - url "https://github.com/jacobsalmela/tccutil/archive/v1.2.11.tar.gz" - sha256 "efff442bc4d1b50ededa0798c9e3a6a881ac3d06310148cf438d5e531f9d6564" + url "https://github.com/jacobsalmela/tccutil/archive/v1.2.13.tar.gz" + sha256 "b0e3f660857426372588b0f659056a059ccbd35a4c91538c75671d960cb91030" license "GPL-2.0-or-later" head "https://github.com/jacobsalmela/tccutil.git", branch: "main" @@ -14,18 +16,36 @@ class Tccutil < Formula depends_on :macos depends_on "python@3.11" - def python - deps.first.to_formula + resource "flit-core" do + url "https://files.pythonhosted.org/packages/c4/e6/c1ac50fe3eebb38a155155711e6e864e254ce4b6e17fe2429b4c4d5b9e80/flit_core-3.9.0.tar.gz" + sha256 "72ad266176c4a3fcfab5f2930d76896059851240570ce9a98733b658cb786eba" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/b9/6c/7c6658d258d7971c5eb0d9b69fa9265879ec9a9158031206d47800ae2213/packaging-23.1.tar.gz" + sha256 "a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f" + end + + def python3 + which("python3.11") end def install - prefix.install_metafiles - libexec.install "tccutil.py" - (bin/"tccutil").write_env_script libexec/"tccutil.py", PATH: "#{python.opt_libexec}/bin:$PATH" + ENV.prepend_create_path "PYTHONPATH", libexec/"vendor"/Language::Python.site_packages(python3) + + resources.each do |r| + r.stage do + system python3, "-m", "pip", "install", *std_pip_args(prefix: libexec/"vendor"), "." + end + end + + rewrite_shebang detected_python_shebang, "tccutil.py" + bin.install "tccutil.py" => "tccutil" + bin.env_script_all_files(libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"]) end test do - ENV.prepend_path "PATH", python.opt_libexec/"bin" - system "#{bin}/tccutil", "--help" + assert_match "Unrecognized command check", shell_output("#{bin}/tccutil check 2>&1") + assert_match "tccutil #{version}", shell_output("#{bin}/tccutil --version") end end From eee3f1b3057d58d206fb920ca357d462f137a0fd Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 28 Aug 2023 03:38:43 +0000 Subject: [PATCH 2/2] tccutil: update 1.2.13 bottle. --- Formula/t/tccutil.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/t/tccutil.rb b/Formula/t/tccutil.rb index 418bf7794febd..71bd7159f935f 100644 --- a/Formula/t/tccutil.rb +++ b/Formula/t/tccutil.rb @@ -9,8 +9,12 @@ class Tccutil < Formula head "https://github.com/jacobsalmela/tccutil.git", branch: "main" bottle do - rebuild 1 - sha256 cellar: :any_skip_relocation, all: "27033a9fedb26e4ea0087263ed08c2ab7136ca8258ac08f2fd0e6511d217c481" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1aafbd63cacbfe93a5b73db49233dd31cc2baa9a1d4c971b18b7db1cc5e620de" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6abb29de36bab0c0b4a6a700b9d53ba3d5d2c60afebf1c5f783d7a08e4618014" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c73485c2e63ce837d7c4bf8aac4d9a8fd87294e9ec551f416b85a5dd188109bd" + sha256 cellar: :any_skip_relocation, ventura: "2416cb241f6a8e985f94aca9c270fa5d38e3c49ccd159fb8d859efcbda32d027" + sha256 cellar: :any_skip_relocation, monterey: "a6a65e5366da57ad3defe1ede9fb4b01333f94b1e98c7ba4d4a552f92155fd12" + sha256 cellar: :any_skip_relocation, big_sur: "8ae37f45387baeb609da0fc88b3d812fe3707100fefed42ca4e506276632f9d4" end depends_on :macos