<commit_before>class Cdiff < Formula
  desc "View colored diff with side by side and auto pager support"
  homepage "https://github.com/ymattw/cdiff"
  url "https://github.com/ymattw/cdiff/archive/0.9.7.tar.gz"
  sha256 "41eff442efc34e545d89b94f47da22ffc5edb4224476728746841b64b69f3512"
  head "https://github.com/ymattw/cdiff.git"

  bottle :unneeded

  def install
    system "python", *Language::Python.setup_install_args(prefix)
  end

  test do
    diff_fixture = File.read test_fixtures "test.diff"
    diff = pipe_output "#{bin}/cdiff -cnever", diff_fixture
    assert_equal diff, diff_fixture
  end
end<commit_msg>cdiff: fix the build<commit_after>class Cdiff < Formula
  desc "View colored diff with side by side and auto pager support"
  homepage "https://github.com/ymattw/cdiff"
  url "https://github.com/ymattw/cdiff/archive/0.9.7.tar.gz"
  sha256 "41eff442efc34e545d89b94f47da22ffc5edb4224476728746841b64b69f3512"
  head "https://github.com/ymattw/cdiff.git"

  bottle :unneeded

  depends_on :python if MacOS.version <= :snow_leopard

  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}/cdiff -cnever", diff_fixture)
  end
end
{'fraction_non_alphanumeric': 0.11409395973154363, 'fraction_numerical': 0.06711409395973154, 'mean_word_length': 4.481617647058823, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4976564', 'n_tokens_mistral': 617, 'n_tokens_neox': 560, 'n_words': 104}