pre-commit 0.8.2

Closes #2660.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-07-02 13:59:28 -07:00
parent ec24bc44a4
commit 1190a52804

View file

@ -1,8 +1,8 @@
class PreCommit < Formula
desc "Framework for managing multi-language pre-commit hooks"
homepage "http://pre-commit.com/"
url "https://github.com/pre-commit/pre-commit/archive/v0.7.6.tar.gz"
sha256 "817e794d62189e649f219491ca529f2208b3e331d06eddb1b4c4118e580c1235"
url "https://github.com/pre-commit/pre-commit/archive/v0.8.2.tar.gz"
sha256 "6300e15ff6fa08dd331d3207ce384885dc093bee0be6d4dacb05dc5c4809d362"
bottle do
cellar :any_skip_relocation
@ -14,55 +14,53 @@ class PreCommit < Formula
depends_on :python if MacOS.version <= :snow_leopard
resource "argparse" do
url "https://pypi.python.org/packages/source/a/argparse/argparse-1.4.0.tar.gz"
sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4"
end
resource "aspy.yaml" do
url "https://pypi.python.org/packages/source/a/aspy.yaml/aspy.yaml-0.2.1.tar.gz"
url "https://files.pythonhosted.org/packages/f0/68/49af646ea5d7ea4a53209109c89a811e5b2569e802d4fcd28763cdded43c/aspy.yaml-0.2.1.tar.gz"
sha256 "a91370183aea63c87d8487e7b399ed2d99a7c2f14b108d27c0bc8ad9ef595d9a"
end
resource "cached-property" do
url "https://pypi.python.org/packages/source/c/cached-property/cached-property-1.2.0.tar.gz"
sha256 "e3081a8182d3d4b7283eeade76c382bcfd4dfd644ca800598229c2ef798abb53"
url "https://files.pythonhosted.org/packages/ae/02/09b905981aefb99c97ad53ac1cc0a90f02c1457a549eae98d87e8e6f2d7e/cached-property-1.3.0.tar.gz"
sha256 "458e78b1c7286ece887d92c9bee829da85717994c5e3ddd253a40467f488bc81"
end
resource "functools32" do
url "https://files.pythonhosted.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz"
sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d"
end
resource "jsonschema" do
url "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz"
url "https://files.pythonhosted.org/packages/58/0d/c816f5ea5adaf1293a1d81d32e4cdfdaf8496973aa5049786d7fdb14e7e7/jsonschema-2.5.1.tar.gz"
sha256 "36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41"
end
resource "nodeenv" do
url "https://pypi.python.org/packages/source/n/nodeenv/nodeenv-0.13.6.tar.gz"
url "https://files.pythonhosted.org/packages/4e/98/7678dda681857af016eae588f8172ea4ea687aeb3dcda6ac05899493ba4b/nodeenv-0.13.6.tar.gz"
sha256 "feaafb0486d776360ef939bd85ba34cff9b623013b13280d1e3770d381ee2b7f"
end
resource "ordereddict" do
url "https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz"
url "https://files.pythonhosted.org/packages/53/25/ef88e8e45db141faa9598fbf7ad0062df8f50f881a36ed6a0073e1572126/ordereddict-1.1.tar.gz"
sha256 "1c35b4ac206cef2d24816c89f89cf289dd3d38cf7c449bb3fab7bf6d43f01b1f"
end
resource "pyyaml" do
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
resource "pyterminalsize" do
url "https://files.pythonhosted.org/packages/58/7a/440407502c758313ff208b55ffeac89ae7d5b23b5baaa7aaeea178103fc1/pyterminalsize-0.1.0.tar.gz"
sha256 "ca49f8c92f180a278d9ca0a106d2c98436933889c9a8bc06adde86d03aea7dd3"
end
resource "PyYAML" do
url "https://files.pythonhosted.org/packages/75/5e/b84feba55e20f8da46ead76f14a3943c8cb722d40360702b2365b91dec00/PyYAML-3.11.tar.gz"
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
end
resource "virtualenv" do
url "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-14.0.6.tar.gz"
sha256 "1ffb6a02d8999e9c97ad8f04b1d2ba44421dfb8f8a98b54aea5c6fdfb53bc526"
end
resource "functools32" do
url "https://pypi.python.org/packages/source/f/functools32/functools32-3.2.3-2.tar.gz"
sha256 "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d"
url "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz"
sha256 "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167"
end
def install
ENV["PYTHONPATH"] = libexec/"vendor/lib/python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
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")
@ -72,9 +70,10 @@ class PreCommit < Formula
# fix aspy.yaml (because namespace .pth isn't processed)
touch libexec/"vendor/lib/python2.7/site-packages/aspy/__init__.py"
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.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end