diff options
| author | Dominyk Tiller | 2015-01-11 15:03:58 +0000 |
|---|---|---|
| committer | Tim D. Smith | 2015-01-11 07:44:46 -0800 |
| commit | ae9737f178ab04c107a9f1514ca472f39483cc98 (patch) | |
| tree | 38b07d1361d32ae92ac561208726236ab96eb709 /Library/Formula/httpie.rb | |
| parent | 1f7466a5c472c960a6ffc9008017239c10bde4bd (diff) | |
| download | homebrew-ae9737f178ab04c107a9f1514ca472f39483cc98.tar.bz2 | |
httpie: fix easy_install.pth file present
Title explains it, really. I think Tim said having easy_install.pth
files present was a bad thing, so when I noticed this thought I’d try
and modernise it to strip that easy_install.pth file away. Hopefully it
looks okay.
Closes #35747.
Signed-off-by: Tim D. Smith <git@tim-smith.us>
Diffstat (limited to 'Library/Formula/httpie.rb')
| -rw-r--r-- | Library/Formula/httpie.rb | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Library/Formula/httpie.rb b/Library/Formula/httpie.rb index 0468b538d..7ff39d062 100644 --- a/Library/Formula/httpie.rb +++ b/Library/Formula/httpie.rb @@ -1,7 +1,5 @@ -require "formula" - class Httpie < Formula - homepage "http://httpie.org" + homepage "https://github.com/jakubroztocil/httpie" url "https://github.com/jakubroztocil/httpie/archive/0.8.0.tar.gz" sha1 "bfffe9d782a896ca57f3dafef3d02bf81a07e5a8" @@ -28,19 +26,22 @@ class Httpie < Formula 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=#{libexec}" - - (bin/"http").write_env_script libexec/"bin/http", :PYTHONPATH => ENV["PYTHONPATH"] + ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" + %w[pygments requests].each do |r| + resource(r).stage do + system "python", *Language::Python.setup_install_args(libexec/"vendor") + end + end + + ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" + system "python", *Language::Python.setup_install_args(libexec) + + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) end test do - system "#{bin}/http", "https://google.com" + output = shell_output("#{bin}/http https://raw.githubusercontent.com/Homebrew/homebrew/master/Library/Formula/httpie.rb") + assert output.include?("PYTHONPATH") end end |
