<commit_before>class Maturin < Formula
  desc "Build and publish Rust crates as Python packages"
  homepage "https://github.com/PyO3/maturin"
  url "https://github.com/PyO3/maturin/archive/refs/tags/v0.12.5.tar.gz"
  sha256 "3685b0a90e3032b9993df0506c6293b7abd4adf4d0f2f09b7fdf6a7ced450bf5"
  license "MIT"
  head "https://github.com/PyO3/maturin.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "0b9e008b4fc330ee884ea8ac913443d993a176d0c03dccce6e4729868a7ecfe6"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "f4bf36f95ffa1eb3937c462dbce73edc2c0dbfc657e2dd9c709d02556f1ac85b"
    sha256 cellar: :any_skip_relocation, monterey:       "5ac3588351c9109b768b3ea74cf5d2d8f05c04ad39f86f653530f5ee3eee3a83"
    sha256 cellar: :any_skip_relocation, big_sur:        "772404055b2b6e5e6c3fd04f8642aa56059024660c4ff22f87e39cfea3b98486"
    sha256 cellar: :any_skip_relocation, catalina:       "866a60108b06258db207938ea2607aed207803280a1861a8f9a9c91ed2bd2501"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "369d4c00af67d6521de1ee2801b490bedd9cfaa2ddbbeaf9e1d364a02c3164d6"
  end

  depends_on "python@3.10" => :test
  depends_on "rust"

  def install
    system "cargo", "install", *std_cargo_args

    bash_output = Utils.safe_popen_read(bin/"maturin", "completions", "bash")
    (bash_completion/"maturin").write bash_output
    zsh_output = Utils.safe_popen_read(bin/"maturin", "completions", "zsh")
    (zsh_completion/"_maturin").write zsh_output
    fish_output = Utils.safe_popen_read(bin/"maturin", "completions", "fish")
    (fish_completion/"maturin.fish").write fish_output
  end

  test do
    ENV.prepend_path "PATH", Formula["python@3.10"].opt_bin<commit_msg>maturin: update 0.12.5 bottle.<commit_after>class Maturin < Formula
  desc "Build and publish Rust crates as Python packages"
  homepage "https://github.com/PyO3/maturin"
  url "https://github.com/PyO3/maturin/archive/refs/tags/v0.12.5.tar.gz"
  sha256 "3685b0a90e3032b9993df0506c6293b7abd4adf4d0f2f09b7fdf6a7ced450bf5"
  license "MIT"
  head "https://github.com/PyO3/maturin.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "2cdc8315a5a14f14e19451cca448dda098c306656e762a1ca79954ffcb13466f"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "83bc8ebaadc4a0b479ec138d921f9ff28070a1d33a99e5020bcf87835c3ec9ba"
    sha256 cellar: :any_skip_relocation, monterey:       "f47ec1c4d128ef18f89b4449feb4e8bc4d1e073a3704c25146de466472f38a14"
    sha256 cellar: :any_skip_relocation, big_sur:        "24add33b2517e404131666fb5634e84302e33980effcc8a876bf66c16293a6c3"
    sha256 cellar: :any_skip_relocation, catalina:       "9ffcb81be230a00e4b62972073d584fa17aa50ac371365a0d6d88d5849ec7f4a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "e8c2b227c310890c383d5988e137e2085cafbbc5708eb663f981e42d17746743"
  end

  depends_on "python@3.10" => :test
  depends_on "rust"

  def install
    system "cargo", "install", *std_cargo_args

    bash_output = Utils.safe_popen_read(bin/"maturin", "completions", "bash")
    (bash_completion/"maturin").write bash_output
    zsh_output = Utils.safe_popen_read(bin/"maturin", "completions", "zsh")
    (zsh_completion/"_maturin").write zsh_output
    fish_output = Utils.safe_popen_read(bin/"maturin", "completions", "fish")
    (fish_completion/"maturin.fish").write fish_output
  end

  test do
    ENV.prepend_path "PATH", Formula["python@3.10"].opt_bin
{'fraction_non_alphanumeric': 0.0980674935102394, 'fraction_numerical': 0.1857513700605711, 'mean_word_length': 5.949899799599199, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6155469', 'n_tokens_mistral': 1848, 'n_tokens_neox': 1485, 'n_words': 186}