2014-06-21 22:47:18 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Httpie < Formula
|
|
|
|
homepage "http://httpie.org"
|
|
|
|
url "https://github.com/jakubroztocil/httpie/archive/0.8.0.tar.gz"
|
|
|
|
sha1 "bfffe9d782a896ca57f3dafef3d02bf81a07e5a8"
|
|
|
|
|
|
|
|
head "https://github.com/jakubroztocil/httpie.git"
|
|
|
|
|
2014-06-24 13:29:14 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-06-24 21:05:41 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "22ddd11f67e37e7100ffd2e83cde865dbea86c5a" => :mavericks
|
|
|
|
sha1 "c401847c644005c08879ccb6ff165b6509b91d0f" => :mountain_lion
|
|
|
|
sha1 "c2b1509dad6a6bb8addca38292d152d2614e8aa9" => :lion
|
2014-06-24 13:29:14 +00:00
|
|
|
end
|
|
|
|
|
2014-06-21 22:47:18 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
|
|
|
resource "pygments" do
|
|
|
|
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-1.6.tar.gz"
|
|
|
|
sha1 "53d831b83b1e4d4f16fec604057e70519f9f02fb"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "requests" do
|
|
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.3.0.tar.gz"
|
|
|
|
sha1 "f57bc125d35ec01a81afe89f97dc75913a927e65"
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec + "lib/python2.7/site-packages"
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", prefix + "lib/python2.7/site-packages"
|
|
|
|
|
|
|
|
install_args = "setup.py", "install", "--prefix=#{libexec}"
|
|
|
|
resource("pygments").stage { system "python", *install_args }
|
|
|
|
resource("requests").stage { system "python", *install_args }
|
|
|
|
|
2014-06-24 20:57:15 +00:00
|
|
|
system "python", "setup.py", "install", "--prefix=#{libexec}"
|
2014-06-21 22:47:18 +00:00
|
|
|
|
2014-06-24 20:57:15 +00:00
|
|
|
(bin/"http").write_env_script libexec/"bin/http", :PYTHONPATH => ENV["PYTHONPATH"]
|
2014-06-21 22:47:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/http", "https://google.com"
|
|
|
|
end
|
|
|
|
end
|