codemod 20151117 (import from head-only)

Closes Homebrew/homebrew#46099.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Baptiste Fontaine 2015-11-17 23:52:28 +01:00
parent c93b57234c
commit dff40bc30f

24
Formula/codemod.rb Normal file
View file

@ -0,0 +1,24 @@
class Codemod < Formula
desc "Large-scale codebase refactors assistant tool"
homepage "https://github.com/facebook/codemod"
url "https://github.com/facebook/codemod/archive/20151117.tar.gz"
sha256 "db1df8896baa58d745aca474b1c8f1a420a40a4a56f30ea783f57b6f5157351c"
head "https://github.com/facebook/codemod.git"
bottle :unneeded
depends_on :python if MacOS.version <= :snow_leopard
def install
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
(libexec/"lib/python2.7/site-packages").mkpath
system "python", *Language::Python.setup_install_args(libexec)
bin.install libexec/"bin/codemod.py" => "codemod"
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system "#{bin}/codemod", "--test"
end
end