homebrew-core/Formula/ydiff.rb
Matt Wang 7284dd0052 Rename cdiff to ydiff (#28674)
* ydiff: renamed from cdiff

Per user request I renamed the package to ydiff to avoid binary name
conflict on major Linux distributions.

* Remove python dependency to use system Python 2.7

macOS has provided Python 2.7 since OS X Lion (10.7), remove the
dependency to avoid pulling down huge, unreasonable dependencies:
sphinx-doc, gdbm, makedepend, openssl, readline, sqlite, python@2, see
log at https://gist.github.com/ymattw/856a00f39ce392e47c1e0e92226eb1b5
2018-06-27 16:18:02 -07:00

21 lines
732 B
Ruby

class Ydiff < Formula
desc "View colored diff with side by side and auto pager support"
homepage "https://github.com/ymattw/ydiff"
url "https://github.com/ymattw/ydiff/archive/1.1.tar.gz"
sha256 "4c749204d1368557e74392845de22155201484edb2fdb5f97730cd6282c2dcca"
bottle :unneeded
def install
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.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
diff_fixture = test_fixtures("test.diff").read
assert_equal diff_fixture,
pipe_output("#{bin}/ydiff -cnever", diff_fixture)
end
end