83 lines
3.8 KiB
Ruby
83 lines
3.8 KiB
Ruby
class Fabric < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "Library and command-line tool for SSH"
|
|
homepage "https://www.fabfile.org/"
|
|
url "https://files.pythonhosted.org/packages/1f/36/9969093324a67cee916f484eda7b3547e8f8e6077f5f2a1814cde80d6fc2/fabric-2.7.1.tar.gz"
|
|
sha256 "76f8fef59cf2061dbd849bbce4fe49bdd820884385004b0ca59136ac3db129e4"
|
|
license "BSD-2-Clause"
|
|
revision 1
|
|
head "https://github.com/fabric/fabric.git", branch: "main"
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_ventura: "a1a7be20ae24e6473efe6b1ba4c4c7e2642ab6d3bb3f7408f5cd3b878c2ae953"
|
|
sha256 cellar: :any, arm64_monterey: "413c265c7f8c0eca5f518999f2fb9e31e5c605a3d00476f52024290932ceb4d0"
|
|
sha256 cellar: :any, arm64_big_sur: "6a7c6299830e150b00b293fcdd0e3d40b8c25c622dce285dac1109fd970f70de"
|
|
sha256 cellar: :any, ventura: "37ad2531d247c000d436e7f967f11ae8297d7d591df339aad718109527eaa56a"
|
|
sha256 cellar: :any, monterey: "d669622ff80f57dbf306736aea82205e09e6dce871f4909e19673484c8bdc496"
|
|
sha256 cellar: :any, big_sur: "75276bc6e1f60bb7f9671b1130f39c2309dfc450341c2bb42ecb9bafdf7f1408"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "c7ca89bcb09a9a20f1982cd1e9b4943a30621b8c953ab05533138217e32bb953"
|
|
end
|
|
|
|
depends_on "rust" => :build
|
|
depends_on "openssl@1.1"
|
|
depends_on "pyinvoke"
|
|
depends_on "python@3.11"
|
|
depends_on "six"
|
|
|
|
resource "bcrypt" do
|
|
url "https://files.pythonhosted.org/packages/8c/ae/3af7d006aacf513975fd1948a6b4d6f8b4a307f8a244e1a3d3774b297aad/bcrypt-4.0.1.tar.gz"
|
|
sha256 "27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd"
|
|
end
|
|
|
|
resource "cffi" do
|
|
url "https://files.pythonhosted.org/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz"
|
|
sha256 "d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"
|
|
end
|
|
|
|
resource "cryptography" do
|
|
url "https://files.pythonhosted.org/packages/12/e3/c46c274cf466b24e5d44df5d5cd31a31ff23e57f074a2bb30931a8c9b01a/cryptography-39.0.0.tar.gz"
|
|
sha256 "f964c7dcf7802d133e8dbd1565914fa0194f9d683d82411989889ecd701e8adf"
|
|
end
|
|
|
|
resource "paramiko" do
|
|
url "https://files.pythonhosted.org/packages/98/75/e78ddbe671a4a59514b59bc6a321263118e4ac3fe88175dd784d1a47a00f/paramiko-2.12.0.tar.gz"
|
|
sha256 "376885c05c5d6aa6e1f4608aac2a6b5b0548b1add40274477324605903d9cd49"
|
|
end
|
|
|
|
resource "pathlib2" do
|
|
url "https://files.pythonhosted.org/packages/31/51/99caf463dc7c18eb18dad1fffe465a3cf3ee50ac3d1dccbd1781336fe9c7/pathlib2-2.3.7.post1.tar.gz"
|
|
sha256 "9fe0edad898b83c0c3e199c842b27ed216645d2e177757b2dd67384d4113c641"
|
|
end
|
|
|
|
resource "pycparser" do
|
|
url "https://files.pythonhosted.org/packages/5e/0b/95d387f5f4433cb0f53ff7ad859bd2c6051051cebbb564f139a999ab46de/pycparser-2.21.tar.gz"
|
|
sha256 "e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"
|
|
end
|
|
|
|
resource "PyNaCl" do
|
|
url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz"
|
|
sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba"
|
|
end
|
|
|
|
def install
|
|
virtualenv_install_with_resources
|
|
|
|
# we depend on pyinvoke, but that's a separate formula, so install a `.pth` file to link them
|
|
site_packages = Language::Python.site_packages("python3.11")
|
|
pyinvoke = Formula["pyinvoke"].opt_libexec
|
|
(libexec/site_packages/"homebrew-pyinvoke.pth").write pyinvoke/site_packages
|
|
end
|
|
|
|
test do
|
|
(testpath/"fabfile.py").write <<~EOS
|
|
from invoke import task
|
|
import fabric
|
|
@task
|
|
def hello(c):
|
|
c.run("echo {}".format(fabric.__version__))
|
|
EOS
|
|
assert_equal version.to_s, shell_output("#{bin}/fab hello").chomp
|
|
end
|
|
end
|