python-tabulate 0.9.0
python-tabulate: fix style issue Signed-off-by: Rui Chen <rui@chenrui.dev>master
parent
2373eb83ab
commit
021585df95
|
@ -1,25 +1,36 @@
|
|||
class PythonTabulate < Formula
|
||||
desc "Pretty-print tabular data in Python"
|
||||
homepage "https://pypi.org/project/tabulate/"
|
||||
url "https://files.pythonhosted.org/packages/7a/53/afac341569b3fd558bf2b5428e925e2eb8753ad9627c1f9188104c6e0c4a/tabulate-0.8.10.tar.gz"
|
||||
sha256 "6c57f3f3dd7ac2782770155f3adb2db0b1a269637e42f27599925e64b114f519"
|
||||
homepage "https://github.com/astanin/python-tabulate"
|
||||
url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz"
|
||||
sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"
|
||||
license "MIT"
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
rebuild 1
|
||||
sha256 cellar: :any_skip_relocation, all: "61e7d23a6d7de917886da888949aef4363ee874ce4d1f153344992b6f2e2c9e5"
|
||||
end
|
||||
|
||||
depends_on "libpython-tabulate"
|
||||
depends_on "python@3.11"
|
||||
depends_on "python@3.10" => [:build, :test]
|
||||
depends_on "python@3.11" => [:build, :test]
|
||||
depends_on "python@3.9" => [:build, :test]
|
||||
|
||||
def pythons
|
||||
deps.map(&:to_formula)
|
||||
.select { |f| f.name.match?(/^python@\d\.\d+$/) }
|
||||
.map { |f| f.opt_libexec/"bin/python" }
|
||||
end
|
||||
|
||||
def install
|
||||
# Install the binary only, the lib part is provided by libpython-tabulate
|
||||
system "python3.11", "setup.py", "--no-user-cfg", "install_scripts", "--install-dir=#{bin}", "--skip-build"
|
||||
pythons.each do |python|
|
||||
system python, "-m", "pip", "install", "--prefix=#{prefix}", "--no-deps", "."
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
pythons.each do |python|
|
||||
system python, "-c", "from tabulate import tabulate"
|
||||
end
|
||||
|
||||
(testpath/"in.txt").write <<~EOS
|
||||
name qty
|
||||
eggs 451
|
||||
|
|
Loading…
Reference in New Issue