2013-11-11 11:27:07 +00:00
|
|
|
class Cookiecutter < Formula
|
2015-01-15 13:59:14 +00:00
|
|
|
homepage "https://github.com/audreyr/cookiecutter"
|
2015-03-23 11:59:46 +00:00
|
|
|
url "https://pypi.python.org/packages/source/c/cookiecutter/cookiecutter-1.0.0.tar.gz"
|
|
|
|
sha256 "ebe8bc662dce0a26effc2a0fb344e5006832aef4cedb9c6a950a1e0e3f3f41fb"
|
2015-01-15 13:59:14 +00:00
|
|
|
head "https://github.com/audreyr/cookiecutter.git"
|
2013-11-11 11:27:07 +00:00
|
|
|
|
2014-10-17 08:46:34 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-03-23 12:09:36 +00:00
|
|
|
sha256 "501bfc26db09d2997cc175aad4b87c1113f9648d036d52d442b130d323f373ec" => :yosemite
|
|
|
|
sha256 "1636f003e6ca16a387fbe16b1c73aaaed1f7d817bb3302170a77652f0d895c06" => :mavericks
|
|
|
|
sha256 "8463ae544df9c9dd5eb1b1daba476fbeaffe678c961b1149b42426e654d82002" => :mountain_lion
|
2014-10-17 08:46:34 +00:00
|
|
|
end
|
|
|
|
|
2014-04-30 22:36:35 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2013-11-11 11:27:07 +00:00
|
|
|
|
2015-01-15 13:59:14 +00:00
|
|
|
resource "binaryornot" do
|
|
|
|
url "https://pypi.python.org/packages/source/b/binaryornot/binaryornot-0.3.0.tar.gz"
|
2015-03-23 11:59:46 +00:00
|
|
|
sha256 "83bc656b147983da8755c7b1e1323825d29a318ee437f91d210b16b1ec8bacf4"
|
2015-01-15 13:59:14 +00:00
|
|
|
end
|
|
|
|
|
2015-03-23 11:59:46 +00:00
|
|
|
resource "MarkupSafe" do
|
2015-01-15 13:59:14 +00:00
|
|
|
url "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz"
|
2015-03-23 11:59:46 +00:00
|
|
|
sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3"
|
2015-01-15 13:59:14 +00:00
|
|
|
end
|
|
|
|
|
2015-03-23 11:59:46 +00:00
|
|
|
resource "PyYAML" do
|
2015-01-15 13:59:14 +00:00
|
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
|
2015-03-23 11:59:46 +00:00
|
|
|
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
|
2015-01-15 13:59:14 +00:00
|
|
|
end
|
|
|
|
|
2015-03-23 11:59:46 +00:00
|
|
|
resource "Jinja2" do
|
2015-01-15 13:59:14 +00:00
|
|
|
url "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz"
|
2015-03-23 11:59:46 +00:00
|
|
|
sha256 "2e24ac5d004db5714976a04ac0e80c6df6e47e98c354cb2c0d82f8879d4f8fdb"
|
2015-01-15 13:59:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "mock" do
|
|
|
|
url "https://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz"
|
2015-03-23 11:59:46 +00:00
|
|
|
sha256 "b839dd2d9c117c701430c149956918a423a9863b48b09c90e30a6013e7d2f44f"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "click" do
|
|
|
|
url "https://pypi.python.org/packages/source/c/click/click-3.3.tar.gz"
|
|
|
|
sha256 "f79c8c04d7eb50071bcad67fd23f3c10fab6c72d56857adf848367806845d6e5"
|
2015-01-15 13:59:14 +00:00
|
|
|
end
|
|
|
|
|
2013-11-11 11:27:07 +00:00
|
|
|
def install
|
2015-01-15 13:59:14 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
|
|
resources.each do |r|
|
|
|
|
r.stage { 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)
|
2013-11-11 11:27:07 +00:00
|
|
|
|
2015-01-15 13:59:14 +00:00
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2013-11-11 11:27:07 +00:00
|
|
|
end
|
2014-04-30 22:36:42 +00:00
|
|
|
|
|
|
|
test do
|
2015-01-21 14:37:51 +00:00
|
|
|
system "git", "clone", "https://github.com/audreyr/cookiecutter-pypackage.git"
|
|
|
|
system bin/"cookiecutter", "--no-input", "cookiecutter-pypackage"
|
|
|
|
assert (testpath/"boilerplate").directory?
|
2014-04-30 22:36:42 +00:00
|
|
|
end
|
2013-11-11 11:27:07 +00:00
|
|
|
end
|