2015-01-01 10:51:48 +00:00
|
|
|
class Goolabs < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Command-line tool for morphologically analyzing Japanese language"
|
2015-01-01 10:51:48 +00:00
|
|
|
homepage "https://pypi.python.org/pypi/goolabs"
|
2016-03-14 16:19:58 +00:00
|
|
|
url "https://pypi.python.org/packages/source/g/goolabs/goolabs-0.3.0.tar.gz"
|
|
|
|
sha256 "a36fd41ddb6df0b8d9caff11ade1e40c6c57d1b81e3e4ec4450f4630c822b397"
|
2015-01-01 10:51:48 +00:00
|
|
|
|
2015-02-19 15:50:29 +00:00
|
|
|
bottle do
|
2016-02-24 21:43:39 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-09-26 10:29:33 +00:00
|
|
|
sha256 "9f542e33d1641a50c0faa25c193982a7498c1511a0b89e30ef72c021a31bdb71" => :sierra
|
2016-03-14 16:46:34 +00:00
|
|
|
sha256 "e6dbce36a389b7f1197634034f5c547060e5c6491f799aa78a68719234a36507" => :el_capitan
|
|
|
|
sha256 "dc27e5bf44ae61cdfca02fe3529f3a7d1572a76441571794ad698c54096e1419" => :yosemite
|
|
|
|
sha256 "ce5182935462c479de2e574d3c10a512cdb134854538e442e2794bc7d6271355" => :mavericks
|
2015-02-19 15:50:29 +00:00
|
|
|
end
|
|
|
|
|
2015-01-01 10:51:48 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
|
|
|
resource "six" do
|
2016-03-14 16:19:58 +00:00
|
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz"
|
|
|
|
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
|
2015-01-01 10:51:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "click" do
|
2016-03-14 16:19:58 +00:00
|
|
|
url "https://pypi.python.org/packages/source/c/click/click-6.3.tar.gz"
|
|
|
|
sha256 "b720d9faabe193287b71e3c26082b0f249501288e153b7e7cfce3bb87ac8cc1c"
|
2015-01-01 10:51:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "requests" do
|
2016-03-14 16:19:58 +00:00
|
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.9.1.tar.gz"
|
|
|
|
sha256 "c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f"
|
2015-01-01 10:51:48 +00:00
|
|
|
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/*"]
|
2016-09-24 15:45:48 +00:00
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2015-01-01 10:51:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match "Usage: goolabs morph", shell_output("#{bin}/goolabs morph test 2>&1", 2)
|
|
|
|
end
|
|
|
|
end
|