<commit_before>{ lib, stdenv, fetchFromGitHub, python2, python3 }:

stdenv.mkDerivation rec {
  pname = "py3c";
  version = "1.3.1";

  src = fetchFromGitHub {
    owner = "encukou";
    repo = pname;
    rev = "v${version}";
    sha256 = "04i2z7hrig78clc59q3i1z2hh24g7z1bfvxznlzxv00d4s57nhpi";
  };

  makeFlags = [
    "prefix=${placeholder "out"}"
  ];

  doCheck = true;

  checkInputs = [
    python2
    python3
  ];

  meta = with lib; {
    homepage = "https://github.com/encukou/py3c";
    description = "Python 2/3 compatibility layer for C extensions";
    license = licenses.mit;
    maintainers = with maintainers; [ ajs124 ];
  };
}<commit_msg>py3c: fix build with darwin (#121447)<commit_after>{ lib, stdenv, fetchFromGitHub, python2, python3 }:

stdenv.mkDerivation rec {
  pname = "py3c";
  version = "1.3.1";

  src = fetchFromGitHub {
    owner = "encukou";
    repo = pname;
    rev = "v${version}";
    sha256 = "04i2z7hrig78clc59q3i1z2hh24g7z1bfvxznlzxv00d4s57nhpi";
  };

  postPatch = lib.optionalString stdenv.cc.isClang ''
    substituteInPlace test/setup.py \
      --replace "'-Werror', " ""
  '';

  makeFlags = [
    "prefix=${placeholder "out"}"
  ];

  doCheck = true;

  checkInputs = [
    python2
    python3
  ];

  meta = with lib; {
    homepage = "https://github.com/encukou/py3c";
    description = "Python 2/3 compatibility layer for C extensions";
    license = licenses.mit;
    maintainers = with maintainers; [ ajs124 dotlambda ];
  };
}
{'fraction_non_alphanumeric': 0.13900134952766532, 'fraction_numerical': 0.05465587044534413, 'mean_word_length': 3.1194444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4658952', 'n_tokens_mistral': 613, 'n_tokens_neox': 567, 'n_words': 111}