homebrew-core/Formula/woob.rb

116 lines
5.1 KiB
Ruby

class Woob < Formula
include Language::Python::Virtualenv
desc "Web Outside of Browsers"
homepage "https://woob.tech/"
url "https://files.pythonhosted.org/packages/fa/32/6ac87f318955292f7917600d8e1d42146279c238a85365428f6944c6b3b9/woob-3.2.tar.gz"
sha256 "f3207daa894153af6e21cad8dc99ad4d68915de7316515421d8009cb90ada780"
license "LGPL-3.0-or-later"
livecheck do
url "https://gitlab.com/woob/woob.git"
regex(/^v?(\d+(?:\.(?:\d+|[a-z])+))$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "530a8d217e66bf1ac5a56bd44d528304747a8d8f8020c34e9f5b373bdd18154e"
sha256 cellar: :any_skip_relocation, arm64_monterey: "f6e4b58ba59cf6698c3707409a409c2578a7a2114ed304fd3606e6b1105d7038"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "5feaf9c390fcc56829b49f5ce50b6d49bf4e525294cff1cbcd55772abfcdac8c"
sha256 cellar: :any_skip_relocation, ventura: "bee9aa8156a85c76a81d15db0939f3f9d237631b4a1d79875ece232ab1cea387"
sha256 cellar: :any_skip_relocation, monterey: "9606ef02982ef08911789757142ee0c3fd64f95dedb2cbfaeb379bf788d8043f"
sha256 cellar: :any_skip_relocation, big_sur: "92082a22babba683f32276c3ea7961b333ebf2c72fa7734a1ca9606f79dcc1ef"
sha256 cellar: :any_skip_relocation, x86_64_linux: "988160eeadac8872cfe3b105aaa64f0bbb1eb63cf91b78ff7d705d64472090d9"
end
depends_on "gnupg"
depends_on "pillow"
depends_on "python@3.11"
depends_on "pyyaml"
depends_on "six"
uses_from_macos "libxml2"
uses_from_macos "libxslt"
resource "Babel" do
url "https://files.pythonhosted.org/packages/ff/80/45b42203ecc32c8de281f52e3ec81cb5e4ef16127e9e8543089d8b1649fb/Babel-2.11.0.tar.gz"
sha256 "5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/37/f7/2b1b0ec44fdc30a3d31dfebe52226be9ddc40cd6c0f34ffc8923ba423b69/certifi-2022.12.7.tar.gz"
sha256 "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/96/d7/1675d9089a1f4677df5eb29c3f8b064aa1e70c1251a0a8a127803158942d/charset-normalizer-3.0.1.tar.gz"
sha256 "ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"
end
resource "colorama" do
url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz"
sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"
end
resource "cssselect" do
url "https://files.pythonhosted.org/packages/d1/91/d51202cc41fbfca7fa332f43a5adac4b253962588c7cc5a54824b019081c/cssselect-1.2.0.tar.gz"
sha256 "666b19839cfaddb9ce9d36bfe4c969132c647b92fc9088c4e23f786b30f1b3dc"
end
resource "html2text" do
url "https://files.pythonhosted.org/packages/6c/f9/033a17d8ea8181aee41f20c74c3b20f1ccbefbbc3f7cd24e3692de99fb25/html2text-2020.1.16.tar.gz"
sha256 "e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz"
sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
end
resource "lxml" do
url "https://files.pythonhosted.org/packages/06/5a/e11cad7b79f2cf3dd2ff8f81fa8ca667e7591d3d8451768589996b65dec1/lxml-4.9.2.tar.gz"
sha256 "2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67"
end
resource "python-dateutil" do
url "https://files.pythonhosted.org/packages/4c/c4/13b4776ea2d76c115c1d1b84579f3764ee6d57204f6be27119f13a61d0a9/python-dateutil-2.8.2.tar.gz"
sha256 "0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"
end
resource "pytz" do
url "https://files.pythonhosted.org/packages/03/3e/dc5c793b62c60d0ca0b7e58f1fdd84d5aaa9f8df23e7589b39cc9ce20a03/pytz-2022.7.1.tar.gz"
sha256 "01a0681c4b9684a28304615eba55d1ab31ae00bf68ec157ec3708a8182dbbcd0"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/9d/ee/391076f5937f0a8cdf5e53b701ffc91753e87b07d66bae4a09aa671897bf/requests-2.28.2.tar.gz"
sha256 "98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"
end
resource "Unidecode" do
url "https://files.pythonhosted.org/packages/0b/25/37c77fc07821cd06592df3f18281f5e716bc891abd6822ddb9ff941f821e/Unidecode-1.3.6.tar.gz"
sha256 "fed09cf0be8cf415b391642c2a5addfc72194407caee4f98719e40ec2a72b830"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/c5/52/fe421fb7364aa738b3506a2d99e4f3a56e079c0a798e9f4fa5e14c60922f/urllib3-1.26.14.tar.gz"
sha256 "076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"
end
def python3
"python3.11"
end
def install
virtualenv_install_with_resources
site_packages = Language::Python.site_packages(python3)
pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n"
(prefix/site_packages/"homebrew-woob.pth").write pth_contents
end
test do
system bin/"woob", "config", "modules"
system python3, "-c", "import woob"
end
end