2013-10-09 21:53:19 +00:00
|
|
|
class CharmTools < Formula
|
2015-09-29 19:38:48 +00:00
|
|
|
desc "Tools for authoring and maintaining juju charms"
|
2015-10-23 19:14:44 +00:00
|
|
|
homepage "https://github.com/juju/charm-tools"
|
|
|
|
url "https://github.com/juju/charm-tools/releases/download/v1.8.0/charm-tools-1.8.0.tar.gz"
|
|
|
|
sha256 "e72e788f069fcf4c2db7435db71ca8feb3dd8c6fd63c4b7e591b4064d76f4dbb"
|
2013-10-09 21:53:19 +00:00
|
|
|
|
2015-03-24 19:50:56 +00:00
|
|
|
bottle do
|
2015-09-30 02:20:44 +00:00
|
|
|
cellar :any_skip_relocation
|
2015-10-24 01:05:40 +00:00
|
|
|
sha256 "ed3e5be4e4f379e2aca09a79a7f6a81225b7eb0c21266bf81ad048a9781d980e" => :el_capitan
|
|
|
|
sha256 "94cd704a118c3792103234da7cc981466a0186a7d41333761d9a4335b7a927e0" => :yosemite
|
|
|
|
sha256 "7e9dda9b12a176005c2ef5293cc001088cede449dc44cae09f0a24dd309c276a" => :mavericks
|
2015-03-24 19:50:56 +00:00
|
|
|
end
|
|
|
|
|
2014-04-30 22:36:21 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2015-08-03 12:55:31 +00:00
|
|
|
depends_on "libyaml"
|
2013-10-09 21:53:19 +00:00
|
|
|
|
2015-10-01 21:53:11 +00:00
|
|
|
resource "pip" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz"
|
|
|
|
sha256 "ca047986f0528cfa975a14fb9f7f106271d4e0c3fe1ddced6c1db2e7ae57a477"
|
|
|
|
end
|
|
|
|
|
2013-10-09 21:53:19 +00:00
|
|
|
def install
|
2015-10-01 21:53:11 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
|
|
%w[pip].each do |r|
|
|
|
|
resource(r).stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
|
2014-01-04 13:03:17 +00:00
|
|
|
system "python", "setup.py", "install", "--prefix=#{libexec}"
|
2013-12-15 22:22:21 +00:00
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
bin.install Dir[libexec/"bin/*charm*"]
|
|
|
|
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2013-10-09 21:53:19 +00:00
|
|
|
end
|
|
|
|
|
2014-01-04 13:03:17 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/charm", "list"
|
2013-10-09 21:53:19 +00:00
|
|
|
end
|
|
|
|
end
|