brew/template.rb.j2
class {{ formula_name }} < Formula
include Language::Python::Virtualenv
desc "{{ package.description }}"
{% if package.homepage %} homepage "{{ package.homepage }}"
{% endif %}
{% if package.license %} license "{{ package.license }}"
{% endif %}
head "https://github.com/janw/podcast-archiver.git", branch: "main"
{{ PACKAGE_URL }}
depends_on "python@3.12"
def python3
"python3.12"
end
def std_pip_args(prefix: self.prefix, build_isolation: false)
["--verbose", "--ignore-installed"]
end
def install
venv = virtualenv_create(libexec, python3, system_site_packages: false)
venv.pip_install buildpath
bin.install_symlink(["#{libexec}/bin/podcast-archiver"])
generate_completions_from_executable(bin/"podcast-archiver", shells: [:zsh, :fish], shell_parameter_format: :click)
end
test do
assert_match "podcast-archiver, ", shell_output(bin/"podcast-archiver --version")
end
end