<commit_before>require "formula"

class Python < Formula
  homepage "http://www.python.org"
  head "http://hg.python.org/cpython", :using => :hg, :branch => "2.7"
  url "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz"
  sha1 "511960dd78451a06c9df76509635aeec05b2051a"

  bottle do
    sha1 "11c4ad33f1a0ec2a9dee025f246e67a0783e8bdb" => :mavericks
    sha1 "522a99761335205b29f348dd9861dc6630a29a35" => :mountain_lion
    sha1 "07ba7ee28c2d6a6d8fcc613b27574090f0e2f27e" => :lion
  end

  option :universal
  option "quicktest", "Run `make quicktest` after the build (for devs; may fail)"
  option "with-brewed-tk", "Use Homebrew's Tk (has optional Cocoa and threads support)"
  option "with-poll", "Enable select.poll, which is not fully implemented on OS X (http://bugs.python.org/issue5154)"
  option "with-dtrace", "Experimental DTrace support (http://bugs.python.org/issue13405)"
  option "with-docs", "Install HTML documentation"

  depends_on "pkg-config" => :build
  depends_on "readline" => :recommended
  depends_on "sqlite" => :recommended
  depends_on "gdbm" => :recommended
  depends_on "openssl"
  depends_on "homebrew/dupes/tcl-tk" if build.with? "brewed-tk"
  depends_on :x11 if build.with? "brewed-tk" and Tab.for_name("tcl-tk").used_options.include?("with-x11")

  skip_clean "bin/pip", "bin/pip-2.7"
  skip_clean "bin/easy_install", "bin/easy_install-2.7"

  resource "docs" do
    url "https://docs.python.org/2/archives/python-2.7.8-docs-html.tar.bz2"
    sha1 "125db6f107f47566e46b5c1745fec1e0dfaf95a0"
  end

  resource "setuptools" do
    url "https://pypi.python.org/packages/source/s/setuptools/setuptools-5.3.tar.gz"
    sha1 "da2da9324a539029ebea602120afcb8cfd24ddf6"
  end

  resource "pip" do
    url "https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz"
    sha1 "e6cd9e6f2fd8d28c9976313632ef8aa8ac31249e"
  end

  # Patch to disable the search for Tk.framework, since Homebrew's Tk is
  # a plain unix build. Remove `-lX11`, too because our Tk is "AquaTk".
  patch :DATA if build.with? "brewed-tk"

  def lib_cellar
    prefix/"Frameworks/Python.framework/Versions/2.7/lib/python2.7"
  end

  def site_packages_cellar
    lib_cellar/"site-packages"
  end
<commit_msg>python: fix docs checksum<commit_after>require "formula"

class Python < Formula
  homepage "http://www.python.org"
  head "http://hg.python.org/cpython", :using => :hg, :branch => "2.7"
  url "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz"
  sha1 "511960dd78451a06c9df76509635aeec05b2051a"

  bottle do
    sha1 "11c4ad33f1a0ec2a9dee025f246e67a0783e8bdb" => :mavericks
    sha1 "522a99761335205b29f348dd9861dc6630a29a35" => :mountain_lion
    sha1 "07ba7ee28c2d6a6d8fcc613b27574090f0e2f27e" => :lion
  end

  option :universal
  option "quicktest", "Run `make quicktest` after the build (for devs; may fail)"
  option "with-brewed-tk", "Use Homebrew's Tk (has optional Cocoa and threads support)"
  option "with-poll", "Enable select.poll, which is not fully implemented on OS X (http://bugs.python.org/issue5154)"
  option "with-dtrace", "Experimental DTrace support (http://bugs.python.org/issue13405)"
  option "with-docs", "Install HTML documentation"

  depends_on "pkg-config" => :build
  depends_on "readline" => :recommended
  depends_on "sqlite" => :recommended
  depends_on "gdbm" => :recommended
  depends_on "openssl"
  depends_on "homebrew/dupes/tcl-tk" if build.with? "brewed-tk"
  depends_on :x11 if build.with? "brewed-tk" and Tab.for_name("tcl-tk").used_options.include?("with-x11")

  skip_clean "bin/pip", "bin/pip-2.7"
  skip_clean "bin/easy_install", "bin/easy_install-2.7"

  resource "docs" do
    url "https://docs.python.org/2/archives/python-2.7.8-docs-html.tar.bz2"
    sha1 "ba0c2ce0ddf0773306ed859262f405de61e486a6"
  end

  resource "setuptools" do
    url "https://pypi.python.org/packages/source/s/setuptools/setuptools-5.3.tar.gz"
    sha1 "da2da9324a539029ebea602120afcb8cfd24ddf6"
  end

  resource "pip" do
    url "https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz"
    sha1 "e6cd9e6f2fd8d28c9976313632ef8aa8ac31249e"
  end

  # Patch to disable the search for Tk.framework, since Homebrew's Tk is
  # a plain unix build. Remove `-lX11`, too because our Tk is "AquaTk".
  patch :DATA if build.with? "brewed-tk"

  def lib_cellar
    prefix/"Frameworks/Python.framework/Versions/2.7/lib/python2.7"
  end

  def site_packages_cellar
    lib_cellar/"site-packages"
  end

{'fraction_non_alphanumeric': 0.13112910481331533, 'fraction_numerical': 0.10008996851102114, 'mean_word_length': 4.219483568075117, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, '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': '6296904', 'n_tokens_mistral': 2046, 'n_tokens_neox': 1794, 'n_words': 343}