cheat 2.0.9 (new formula)
This commit is contained in:
parent
2fdaeeb4f2
commit
6979a8b631
1 changed files with 42 additions and 0 deletions
42
Formula/cheat.rb
Normal file
42
Formula/cheat.rb
Normal file
|
@ -0,0 +1,42 @@
|
|||
require "formula"
|
||||
|
||||
class Cheat < Formula
|
||||
homepage "https://github.com/chrisallenlane/cheat"
|
||||
url "https://github.com/chrisallenlane/cheat/archive/2.0.9.tar.gz"
|
||||
sha1 "cf4a76badd8d0e58c9299037703ba4abbd2217df"
|
||||
head "https://github.com/chrisallenlane/cheat.git"
|
||||
|
||||
depends_on :python if MacOS.version <= :snow_leopard
|
||||
|
||||
resource "docopt" do
|
||||
url "https://pypi.python.org/packages/source/d/docopt/docopt-0.6.1.tar.gz"
|
||||
sha1 "3d0ad1cf495d2c801327042e02d67b4ee4b85cd4"
|
||||
end
|
||||
|
||||
resource "Pygments" do
|
||||
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-1.6.tar.gz"
|
||||
sha1 "53d831b83b1e4d4f16fec604057e70519f9f02fb"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
|
||||
|
||||
install_args = [ "setup.py", "install", "--prefix=#{libexec}" ]
|
||||
|
||||
%w[docopt Pygments].each do |r|
|
||||
resource(r).stage { system "python", *install_args }
|
||||
end
|
||||
|
||||
system "python", "setup.py", "install", "--prefix=#{prefix}"
|
||||
|
||||
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
|
Loading…
Reference in a new issue