110 lines
4 KiB
Ruby
110 lines
4 KiB
Ruby
class DockerCompose < Formula
|
|
desc "Isolated development environments using Docker"
|
|
homepage "https://docs.docker.com/compose/"
|
|
|
|
stable do
|
|
url "https://github.com/docker/compose/archive/1.5.1.tar.gz"
|
|
sha256 "334814f64910823fa588e89eea8f73d8ad3bb0d304e513fe51026a1f1d08d3db"
|
|
end
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "7fa526cbbe59007c5c781df2dfb5c0da37c9c7f09c6f6eb4754fba92e3ffbe4e" => :el_capitan
|
|
sha256 "882b21f34c9567091bb689c73a21d1e3c0dd74819b5c4ee0c175a224af87bdbc" => :yosemite
|
|
sha256 "27ba7ebdff9e81835b8ddda06ee52b539f47b5f4073532a9c669ee9282ecb5bd" => :mavericks
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/docker/compose.git"
|
|
end
|
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
depends_on "libyaml"
|
|
|
|
# It's possible that the user wants to manually install Docker and Machine,
|
|
# for example, they want to compile Docker manually
|
|
depends_on "docker" => :recommended
|
|
depends_on "docker-machine" => :recommended
|
|
|
|
resource "docker-py" do
|
|
url "https://pypi.python.org/packages/source/d/docker-py/docker-py-1.5.0.tar.gz"
|
|
sha256 "6924128fac46afef0de16ebdffc30a8c071246312260f289d895129f4e00f8d0"
|
|
end
|
|
|
|
resource "requests" do
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.7.0.tar.gz"
|
|
sha256 "398a3db6d61899d25fd4a06c6ca12051b0ce171d705decd7ed5511517b4bb93d"
|
|
end
|
|
|
|
resource "enum34" do
|
|
url "https://pypi.python.org/packages/source/e/enum34/enum34-1.0.4.tar.gz"
|
|
sha256 "d3c19f26a6a34629c18c775f59dfc5dd595764c722b57a2da56ebfb69b94e447"
|
|
end
|
|
|
|
resource "jsonschema" do
|
|
url "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz"
|
|
sha256 "36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41"
|
|
end
|
|
|
|
resource "functools32" do
|
|
url "https://pypi.python.org/packages/source/f/functools32/functools32-3.2.3-2.tar.gz"
|
|
sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d"
|
|
end
|
|
|
|
resource "pyyaml" do
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.10.tar.gz"
|
|
sha256 "e713da45c96ca53a3a8b48140d4120374db622df16ab71759c9ceb5b8d46fe7c"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.7.3.tar.gz"
|
|
sha256 "7a842c9f882c0b2ab1064d567bb9fff6a21c9efbc3d9992083ad6193787ed393"
|
|
end
|
|
|
|
resource "dockerpty" do
|
|
url "https://pypi.python.org/packages/source/d/dockerpty/dockerpty-0.3.4.tar.gz"
|
|
sha256 "a51044cc49089a2408fdf6769a63eebe0b16d91f34716ecee681984446ce467d"
|
|
end
|
|
|
|
resource "texttable" do
|
|
url "https://pypi.python.org/packages/source/t/texttable/texttable-0.8.2.tar.gz"
|
|
sha256 "c0c5b2aa4eab132d40aadb7c4e81f98fc93d3a1e6cb44e9be76779d74f32e6be"
|
|
end
|
|
|
|
resource "docopt" do
|
|
url "https://pypi.python.org/packages/source/d/docopt/docopt-0.6.1.tar.gz"
|
|
sha256 "71ad940a773fbc23be6093e9476ad57b2ecec446946a28d30127501f3b29aa35"
|
|
end
|
|
|
|
resource "websocket-client" do
|
|
url "https://github.com/liris/websocket-client/archive/v0.32.0.tar.gz"
|
|
sha256 "255d07ffa677f571b5f51c11703f2f4bd5f331b58442677bcb4395dfa1809a5f"
|
|
end
|
|
|
|
resource "backports.ssl_match_hostname" do
|
|
url "https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.4.0.2.tar.gz"
|
|
sha256 "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
resources.each do |r|
|
|
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)
|
|
|
|
bash_completion.install "contrib/completion/bash/docker-compose"
|
|
zsh_completion.install "contrib/completion/zsh/_docker-compose"
|
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
end
|
|
|
|
test do
|
|
assert_match /#{version}/, shell_output(bin/"docker-compose --version")
|
|
end
|
|
end
|