homebrew-core/Formula/woob.rb

118 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/70/f2/f443eb3c270a469cefe235eb776062c8adf548604e35cc984193d87bd0ce/woob-3.0.tar.gz"
sha256 "47864df4906b44a659abe59630c0e28a1aa24ffbc3c90e22454b58f88bef1726"
license "LGPL-3.0-or-later"
revision 3
livecheck do
url "https://gitlab.com/woob/woob.git"
regex(/^v?(\d+(?:\.(?:\d+|[a-z])+))$/i)
end
bottle do
rebuild 2
sha256 cellar: :any_skip_relocation, arm64_ventura: "a85ca3288f8ac45a939cb1b8c007a71a50fc683302a4781259e580fcf3af5548"
sha256 cellar: :any_skip_relocation, arm64_monterey: "2eb93552da75bc048abd5c3591e52fe11e00c6b3c51d72723f2923515117057d"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "96574dcbb5d6439ca5b631068dc8900d2e2e4c9b4c8c9438ccf84875f0980db8"
sha256 cellar: :any_skip_relocation, monterey: "13e9d79aadc0cd9d9f918bdfbaa6704470069ceb9b8b984bc7de690a0954e571"
sha256 cellar: :any_skip_relocation, big_sur: "5d0fb624a55152b4c975458b6877b65dc42df04698975ae3fd1195ed9f7d5873"
sha256 cellar: :any_skip_relocation, catalina: "850ddb1215c6e4dee4523cf996d834daa4a0e10239d629d146b9a405e26cf082"
sha256 cellar: :any_skip_relocation, x86_64_linux: "99c54a11b3640df729ec919daffd45cc0f07a58948d2a3cca1200e9f7e38d975"
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/cb/a4/7de7cd59e429bd0ee6521ba58a75adaec136d32f91a761b28a11d8088d44/certifi-2022.9.24.tar.gz"
sha256 "0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/a1/34/44964211e5410b051e4b8d2869c470ae8a68ae274953b1c7de6d98bbcf94/charset-normalizer-2.1.1.tar.gz"
sha256 "5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"
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/70/bb/7a2c7b4f8f434aa1ee801704bf08f1e53d7b5feba3d5313ab17003477808/lxml-4.9.1.tar.gz"
sha256 "fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"
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/76/63/1be349ff0a44e4795d9712cc0b2d806f5e063d4d34631b71b832fac715a8/pytz-2022.6.tar.gz"
sha256 "e89512406b793ca39f5971bc999cc538ce125c0e51c27941bef4568b460095e2"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz"
sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
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/b2/56/d87d6d3c4121c0bcec116919350ca05dc3afd2eeb7dc88d07e8083f8ea94/urllib3-1.26.12.tar.gz"
sha256 "3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"
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