homebrew-core/Formula/pyvim.rb

66 lines
2.9 KiB
Ruby

class Pyvim < Formula
include Language::Python::Virtualenv
desc "Pure Python Vim clone"
homepage "https://github.com/prompt-toolkit/pyvim"
url "https://files.pythonhosted.org/packages/c3/31/04e144ec3a3a0303e3ef1ef9c6c1ec8a3b5ba9e88b98d21442d9152783c1/pyvim-3.0.3.tar.gz"
sha256 "2a3506690f73a79dd02cdc45f872d3edf20a214d4c3666d12459e2ce5b644baa"
license "BSD-3-Clause"
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "d15f32fb0a34a55dc463c295c8128850cdf204943e7131a9a3dc9a9fdae3ecdf"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "dfc63addea95214544eda8ef234bd2b4a20ccecda3eb456d4b9074334650fb79"
sha256 cellar: :any_skip_relocation, monterey: "bc7d8400d12f030798fed3248e94f6e10f37cca3b39988a4d2a3d32c8686daab"
sha256 cellar: :any_skip_relocation, big_sur: "b92f0c634710abccc00652d23f09a89e47cc30bf52f314b45967075d395c097c"
sha256 cellar: :any_skip_relocation, catalina: "2d3021b4381d4953a397b284a4291b1e2c50e5632975dd914ba6b03750e78ae7"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7e74725182c80d2c3d325e7dd6d7cfd71bb72e94c32552246206d006d94dd889"
end
depends_on "python@3.10"
depends_on "six"
resource "docopt" do
url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz"
sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
end
resource "prompt-toolkit" do
url "https://files.pythonhosted.org/packages/59/68/4d80f22e889ea34f20483ae3d4ca3f8d15f15264bcfb75e52b90fb5aefa5/prompt_toolkit-3.0.29.tar.gz"
sha256 "bd640f60e8cecd74f0dc249713d433ace2ddc62b65ee07f96d358e0b152b6ea7"
end
resource "pyflakes" do
url "https://files.pythonhosted.org/packages/15/60/c577e54518086e98470e9088278247f4af1d39cb43bcbd731e2c307acd6a/pyflakes-2.4.0.tar.gz"
sha256 "05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"
end
resource "Pygments" do
url "https://files.pythonhosted.org/packages/59/0f/eb10576eb73b5857bc22610cdfc59e424ced4004fe7132c8f2af2cc168d3/Pygments-2.12.0.tar.gz"
sha256 "5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"
end
resource "six" do
url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz"
sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"
end
resource "wcwidth" do
url "https://files.pythonhosted.org/packages/89/38/459b727c381504f361832b9e5ace19966de1a235d73cdbdea91c771a1155/wcwidth-0.2.5.tar.gz"
sha256 "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"
end
def install
virtualenv_install_with_resources
end
test do
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]
# Need a pty due to https://github.com/prompt-toolkit/pyvim/issues/101
require "pty"
PTY.spawn(bin/"pyvim", "--help") do |r, _w, _pid|
assert_match "Vim clone", r.read
end
end
end