diff options
| author | barberio | 2014-06-21 23:47:18 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-06-24 15:59:37 +0100 |
| commit | dbfc76badaf78cae50e65588182e47282be4e63d (patch) | |
| tree | ee95b615d32d4bddaafc3c7c1648fd6ef1327b3e /Library/Formula/httpie.rb | |
| parent | a8c2770ef93e4824f58245d06adcc70ba10a1562 (diff) | |
| download | homebrew-dbfc76badaf78cae50e65588182e47282be4e63d.tar.bz2 | |
httpie 0.8.0 (new formula)
HTTPie (pronounced aych-tee-tee-pie) is a command line HTTP client. Its
goal is to make CLI interaction with web services as human-friendly as
possible.
Diffstat (limited to 'Library/Formula/httpie.rb')
| -rw-r--r-- | Library/Formula/httpie.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Library/Formula/httpie.rb b/Library/Formula/httpie.rb new file mode 100644 index 000000000..bcfbb0706 --- /dev/null +++ b/Library/Formula/httpie.rb @@ -0,0 +1,43 @@ +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" + + 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 } + + system "python", "setup.py", "install", "--prefix=#{prefix}" + + # These are now rolled into 1.6 and cause linking conflicts + rm [Dir.glob("#{bin}/easy_install*"), + "#{lib}/python2.7/site-packages/site.py", + Dir.glob("#{lib}/python2.7/site-packages/*.pth")] + + bin.env_script_all_files(libexec + "bin", :PYTHONPATH => ENV["PYTHONPATH"]) + end + + test do + system "#{bin}/http", "https://google.com" + end +end |
