Skip to content

Commit

Permalink
googlecl: include gdata resource
Browse files Browse the repository at this point in the history
Fixes Homebrew#36992.

Closes Homebrew#37035.

Signed-off-by: Tim D. Smith <[email protected]>
  • Loading branch information
tdsmith committed Feb 21, 2015
1 parent a76ec51 commit 3b04352
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Library/Formula/googlecl.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'formula'

class Googlecl < Formula
homepage 'https://code.google.com/p/googlecl/'
url 'https://googlecl.googlecode.com/files/googlecl-0.9.14.tar.gz'
Expand All @@ -9,16 +7,25 @@ class Googlecl < Formula

conflicts_with 'osxutils', :because => 'both install a google binary'

resource "gdata" do
url "https://pypi.python.org/packages/source/g/gdata/gdata-2.0.18.tar.gz"
sha1 "4cd6804f2af81697219307421996c6055c7c16e4"
end

def install
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
system "python", "setup.py", "install",
"--prefix=#{prefix}", "--single-version-externally-managed",
"--record=installed.txt"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
resource("gdata").stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
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}/google", '--version'
system "#{bin}/google", "help", "docs"
end
end

0 comments on commit 3b04352

Please sign in to comment.