forked from adestefan/homebrew-headonly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchoose.rb
30 lines (23 loc) · 894 Bytes
/
choose.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require "formula"
class Choose < Formula
homepage "https://github.com/geier/choose"
head "https://github.com/geier/choose.git", :revision => "9f24eb9771cdc2c2566718822704c3ee488d8345"
resource "urwid" do
url "https://pypi.python.org/packages/source/u/urwid/urwid-1.2.1.tar.gz"
sha1 "28bd77014cce92bcb09ccc11f93e558d02265082"
end
def install
ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages'
resource("urwid").stage do
system "python", "setup.py", "install", "--prefix=#{libexec}"
end
bin.install "choose"
bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
end
test do
# There isn't really a better test than that the executable exists
# and is executable because you can't run it without producing an
# interactive selection ui.
File.executable?("#{bin}/choose")
end
end