52 lines
1.8 KiB
Ruby
52 lines
1.8 KiB
Ruby
class Goolabs < Formula
|
|
desc "Command-line tool for morphologically analyzing Japanese language"
|
|
homepage "https://pypi.python.org/pypi/goolabs"
|
|
url "https://pypi.python.org/packages/source/g/goolabs/goolabs-0.1.1.tar.gz"
|
|
sha1 "3201102ab0fad77d57a09dd7c879f6f163e05799"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "b66b183f0a8ac370648b1c1a9a060be119b2f4dcd2579c9f7adb50c9467a3249" => :yosemite
|
|
sha256 "bd2d16c7d34b8d923e6d68356158e8a46b5266463a0e30ad557a133960efd0ff" => :mavericks
|
|
sha256 "6afbdf9a7c5caacc02463f7e8e8688359912112118ed8baf23dc38c3845b0c90" => :mountain_lion
|
|
end
|
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
resource "six" do
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz"
|
|
sha1 "aa3b0659cbc85c6c7a91efc51f2d1007040070cd"
|
|
end
|
|
|
|
resource "click" do
|
|
url "https://pypi.python.org/packages/source/c/click/click-3.3.tar.gz"
|
|
sha1 "d716a932b930d71059e49465b6b42e833808369a"
|
|
end
|
|
|
|
resource "requests" do
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.6.0.tar.gz"
|
|
sha256 "1cdbed1f0e236f35ef54e919982c7a338e4fea3786310933d3a7887a04b74d75"
|
|
end
|
|
|
|
def install
|
|
ENV["PYTHONPATH"] = libexec/"vendor/lib/python2.7/site-packages"
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
|
|
res = %w[six click requests]
|
|
res.each do |r|
|
|
resource(r).stage do
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
end
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
|
|
|
bin.install Dir["#{libexec}/bin/*"]
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
end
|
|
|
|
test do
|
|
assert_match "Usage: goolabs morph", shell_output("#{bin}/goolabs morph test 2>&1", 2)
|
|
end
|
|
end
|