homebrew-core/Formula/pip-tools.rb

62 lines
2.8 KiB
Ruby

class PipTools < Formula
include Language::Python::Virtualenv
desc "Locking and sync for Pip requirements files"
homepage "https://pip-tools.readthedocs.io"
url "https://files.pythonhosted.org/packages/b7/6b/e16d0ac0fed917b9575dc2b324866a7e2fb80d328d8aa285ddb89d1199a1/pip-tools-6.12.1.tar.gz"
sha256 "88efb7b29a923ffeac0713e6f23ef8529cc6175527d42b93f73756cc94387293"
license "BSD-3-Clause"
bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "977e756eb5fd745220792b73f8dc7fe456ba2ec682aca1a08a1d05b1d3ba1ca8"
sha256 cellar: :any_skip_relocation, arm64_monterey: "28604d7abc103246a89030f92edc97788d3397ad691aa97b7c0d7a7a9b130b4e"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "0c7dcbe50f489be7b2d08bb60f9d3887e31d5b7797bd82cac2b568faf0675e99"
sha256 cellar: :any_skip_relocation, ventura: "647db1edae30e803ee704c7313c050639118328f915048e528656be262cb183a"
sha256 cellar: :any_skip_relocation, monterey: "9d737c8e5f849cecedeb20306dffb46345d123d1d35ae64acd4c3923ae6b6936"
sha256 cellar: :any_skip_relocation, big_sur: "04730153a8be86c5cad8394dc6405ee2c1a176be1d622eb2d45e2a504c91c590"
sha256 cellar: :any_skip_relocation, x86_64_linux: "5a7970b84dfe1929a1cd377659f24561c4170e606582395d89239c201b529ca1"
end
depends_on "python@3.11"
resource "build" do
url "https://files.pythonhosted.org/packages/0f/61/aaf43fbb36cc4308be8ac8088f52db9622b0dbf1f0880c1016ae6aa03f46/build-0.9.0.tar.gz"
sha256 "1a07724e891cbd898923145eb7752ee7653674c511378eb9c7691aab1612bc3c"
end
resource "click" do
url "https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz"
sha256 "7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"
end
resource "packaging" do
url "https://files.pythonhosted.org/packages/6b/f7/c240d7654ddd2d2f3f328d8468d4f1f876865f6b9038b146bec0a6737c65/packaging-22.0.tar.gz"
sha256 "2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"
end
resource "pep517" do
url "https://files.pythonhosted.org/packages/4d/19/e11fcc88288f68ae48e3aa9cf5a6fd092a88e629cb723465666c44d487a0/pep517-0.13.0.tar.gz"
sha256 "ae69927c5c172be1add9203726d4b84cf3ebad1edcd5f71fcdc746e66e829f59"
end
resource "wheel" do
url "https://files.pythonhosted.org/packages/a2/b8/6a06ff0f13a00fc3c3e7d222a995526cbca26c1ad107691b6b1badbbabf1/wheel-0.38.4.tar.gz"
sha256 "965f5259b566725405b05e7cf774052044b1ed30119b5d586b2703aafe8719ac"
end
def install
virtualenv_install_with_resources
end
test do
(testpath/"requirements.in").write <<~EOS
pip-tools
typing-extensions
EOS
compiled = shell_output("#{bin}/pip-compile requirements.in -q -o -")
assert_match "This file is autogenerated by pip-compile", compiled
assert_match "# via pip-tools", compiled
end
end