homebrew-core/Formula/cheat.rb

46 lines
1.4 KiB
Ruby
Raw Normal View History

2014-05-26 05:15:10 +00:00
class Cheat < Formula
homepage "https://github.com/chrisallenlane/cheat"
url "https://github.com/chrisallenlane/cheat/archive/2.1.2.tar.gz"
sha1 "68f8120bb3369cb1daf2f84023c212c4777ce8ef"
2014-05-26 05:15:10 +00:00
head "https://github.com/chrisallenlane/cheat.git"
2014-06-05 14:11:37 +00:00
bottle do
cellar :any
2014-12-11 07:17:56 +00:00
sha1 "2065b733837eec5819c19da3cc4b1010b840f463" => :yosemite
sha1 "5a3913a93b5f17cc290d21eac872e0c6005d4139" => :mavericks
sha1 "1c8817ce2a46114339a76defe1c45ce2f4b81e4c" => :mountain_lion
2014-06-05 14:11:37 +00:00
end
2014-05-26 05:15:10 +00:00
depends_on :python if MacOS.version <= :snow_leopard
resource "docopt" do
url "https://pypi.python.org/packages/source/d/docopt/docopt-0.6.2.tar.gz"
sha1 "224a3ec08b56445a1bd1583aad06b00692671e04"
2014-05-26 05:15:10 +00:00
end
resource "Pygments" do
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz"
sha1 "b9e9236693ccf6e86414e8578bf8874181f409de"
2014-05-26 05:15:10 +00:00
end
def install
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
2014-07-19 00:11:44 +00:00
resources.each do |r|
r.stage { system "python", *Language::Python.setup_install_args(libexec) }
2014-05-26 05:15:10 +00:00
end
system "python", *Language::Python.setup_install_args(prefix)
2014-05-26 05:15:10 +00:00
bash_completion.install "cheat/autocompletion/cheat.bash"
zsh_completion.install "cheat/autocompletion/cheat.zsh" => "_cheat"
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system "#{bin}/cheat", "tar"
end
end