homebrew-core/Formula/internetarchive.rb

87 lines
4.3 KiB
Ruby

class Internetarchive < Formula
include Language::Python::Virtualenv
desc "Python wrapper for the various Internet Archive APIs"
homepage "https://github.com/jjjake/internetarchive"
url "https://files.pythonhosted.org/packages/2d/fd/4ac60fdd9b5d9d836d763a5627beb5578db7f6953105db02d032288db675/internetarchive-3.2.0.tar.gz"
sha256 "701ee744398ed8d35a1e33641c2b971f4fb5e5665fc6c792f0305d22a79f4b39"
license "AGPL-3.0-or-later"
bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "183329d73892ecd2919e778ed6d79a14ecfbbb6dab5fdbeb807f0eb25c836e86"
sha256 cellar: :any_skip_relocation, arm64_monterey: "a751cff59ce3c500d6046ca8d71bdf9902f94b2cd797217ea2bc5d309580dd75"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "f6aee0b7a5f3f10a166167121cb63bda4c71a1ae4958f37b143f9c2dff4fce4d"
sha256 cellar: :any_skip_relocation, ventura: "5c4d843d34a06f7063c73986292779c8a478300484065a6f963b994002a657cd"
sha256 cellar: :any_skip_relocation, monterey: "6f8da51e1640f818e9d48e06f2f798b32a784f6addd90f172fd2d40697cd9d1e"
sha256 cellar: :any_skip_relocation, big_sur: "d8e1d560636e55c15f197838e52eb0001b9ff036b121e25a4ed1a7741574e500"
sha256 cellar: :any_skip_relocation, x86_64_linux: "3eb0093b67ff0d87267ca694d919e31e4b1080212083d1bfbd0e847736f3ef66"
end
depends_on "python@3.11"
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/a1/34/44964211e5410b051e4b8d2869c470ae8a68ae274953b1c7de6d98bbcf94/charset-normalizer-2.1.1.tar.gz"
sha256 "5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"
end
resource "contextlib2" do
url "https://files.pythonhosted.org/packages/c7/13/37ea7805ae3057992e96ecb1cffa2fa35c2ef4498543b846f90dd2348d8f/contextlib2-21.6.0.tar.gz"
sha256 "ab1e2bfe1d01d968e1b7e8d9023bc51ef3509bba217bb730cee3827e1ee82869"
end
resource "docopt" do
url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz"
sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz"
sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
end
resource "jsonpatch" do
url "https://files.pythonhosted.org/packages/21/67/83452af2a6db7c4596d1e2ecaa841b9a900980103013b867f2865e5e1cf0/jsonpatch-1.32.tar.gz"
sha256 "b6ddfe6c3db30d81a96aaeceb6baf916094ffa23d7dd5fa2c13e13f8b6e600c2"
end
resource "jsonpointer" do
url "https://files.pythonhosted.org/packages/a0/6c/c52556b957a0f904e7c45585444feef206fe5cb1ff656303a1d6d922a53b/jsonpointer-2.3.tar.gz"
sha256 "97cba51526c829282218feb99dab1b1e6bdf8efd1c43dc9d57be093c0d69c99a"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz"
sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
end
resource "schema" do
url "https://files.pythonhosted.org/packages/4e/e8/01e1b46d9e04cdaee91c9c736d9117304df53361a191144c8eccda7f0ee9/schema-0.7.5.tar.gz"
sha256 "f06717112c61895cabc4707752b88716e8420a8819d71404501e114f91043197"
end
resource "tqdm" do
url "https://files.pythonhosted.org/packages/c1/c2/d8a40e5363fb01806870e444fc1d066282743292ff32a9da54af51ce36a2/tqdm-4.64.1.tar.gz"
sha256 "5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/c2/51/32da03cf19d17d46cce5c731967bf58de9bd71db3a379932f53b094deda4/urllib3-1.26.13.tar.gz"
sha256 "c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"
end
def install
virtualenv_install_with_resources
bin.install_symlink libexec/"bin/ia"
end
test do
metadata = JSON.parse shell_output("#{bin}/ia metadata tigerbrew")
assert_equal metadata["metadata"]["uploader"], "mistydemeo@gmail.com"
end
end