Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew formula: does it need these #1

Closed
mahiki opened this issue Jul 23, 2024 · 1 comment
Closed

Brew formula: does it need these #1

mahiki opened this issue Jul 23, 2024 · 1 comment

Comments

@mahiki
Copy link
Owner

mahiki commented Jul 23, 2024

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
Copy link
Owner Author

mahiki commented Jul 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant