mahiki / homebrew-tap

MIT License
1 stars 0 forks source link

Brew formula: does it need these #1

Closed mahiki closed 1 month ago

mahiki commented 1 month ago

Does the formula need these:

 depends_on "python@3.11"

 resource "gitdb"

 resource "GitPython"

 resource "smmap"

The first install I did referenced the pyproject python spec, so I changed depends_on from 3.9 to 3.11. But maybe its not needed. The others may be needed for homebrew to work or maybe I just copied them blindly from some other package.

mahiki commented 1 month ago

Got it. So the depends_on is needed, but that resource manual definition stuff is for the birds. This works locally, going to deploy and close this. Took me two days of investigation to get here.


class Desertislandutils < Formula
  include Language::Python::Virtualenv

  desc "Be here, thy collection of personal convenience utilities"
  homepage "https://github.com/mahiki/homebrew-tap"
  url "https://github.com/mahiki/desertislandutils/releases/download/v0.3.10/desertislandutils-0.3.10.tar.gz"
  sha256 "9c8304fdb02a1fd9d3ffd460cdaf25f1b22a70f2d18ebde700080d328c306216"
  license "MIT"

  depends_on "python@3.11"
  depends_on "poetry"

  def install
    venv = virtualenv_create(libexec, "python3")
    ENV["VIRTUAL_ENV"] = libexec
    system "poetry", "install", "--no-root"
    venv.pip_install_and_link buildpath
  end

  test do
    system "#{bin}/wn", "--help"
    system "#{bin}/too", "--help"
  end
end