aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/juju-quickstart.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/Library/Formula/juju-quickstart.rb b/Library/Formula/juju-quickstart.rb
new file mode 100644
index 000000000..34856fb81
--- /dev/null
+++ b/Library/Formula/juju-quickstart.rb
@@ -0,0 +1,26 @@
+require "formula"
+
+class JujuQuickstart < Formula
+ homepage "https://launchpad.net/juju-quickstart"
+ url "https://pypi.python.org/packages/source/j/juju-quickstart/juju-quickstart-1.3.5.tar.gz"
+ sha1 "a570fd3f05d67dfd5ea7735ec8694e78cd22cf57"
+
+ depends_on :python if MacOS.version <= :snow_leopard
+ depends_on "juju"
+
+ def install
+ ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages'
+ system "python", "setup.py", "install", "--prefix=#{libexec}"
+ bin.install Dir[libexec/'bin/juju-quickstart']
+ bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
+ end
+
+ test do
+ # While a --version test is noted to be a "bad" test it does
+ # exercise that most of the packages can be imported, so it is
+ # better than nothing. Can't really test the spinning up of Juju
+ # environments on ec2 as part of installation, given that would
+ # cost real money.
+ system "#{bin}/juju-quickstart", "--version"
+ end
+end