<commit_before>{ lib
, buildPythonPackage
, fetchPypi
, pkgconfig
, pytest
, pytestrunner
, cffi
, secp256k1
}:

buildPythonPackage rec {
  pname = "secp256k1";
  version = "0.13.2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "a3b43e02d321c09eafa769a6fc2c156f555cab3a7db62175ef2fd21e16cdf20c";
  };

  nativeBuildInputs = [ pkgconfig ];
  checkInputs = [ pytest pytestrunner ];
  propagatedBuildInputs = [ cffi secp256k1 ];

  # Tests are not included in archive
  doCheck = false;

  preConfigure = ''
    cp -r ${secp256k1.src} libsecp256k1
    touch libsecp256k1/autogen.sh
    export INCLUDE_DIR=${secp256k1}/include
    export LIB_DIR=${secp256k1}/lib
  '';

  checkPhase = ''
    py.test tests
  '';

  postPatch = ''
    substituteInPlace setup.py --replace ", 'pytest-runner==2.6.2'" ""
  '';

  meta = {
    homepage = "https://github.com/ludbb/secp256k1-py";
    description = "Python FFI bindings for secp256k1";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ chris-martin ];
  };
}
<commit_msg>pythonPackages.secp256k1: fix broken package (#88612)<commit_after>{ lib
, buildPythonPackage
, fetchPypi
, pkgconfig
, pytest
, pytestrunner
, cffi
, secp256k1
}:

buildPythonPackage rec {
  pname = "secp256k1";
  version = "0.13.2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "a3b43e02d321c09eafa769a6fc2c156f555cab3a7db62175ef2fd21e16cdf20c";
  };

  nativeBuildInputs = [ pkgconfig ];
  checkInputs = [ pytest pytestrunner ];
  propagatedBuildInputs = [ cffi secp256k1 ];

  # Tests are not included in archive
  doCheck = false;

  preConfigure = ''
    cp -r ${secp256k1.src} libsecp256k1
    touch libsecp256k1/autogen.sh
    export INCLUDE_DIR=${secp256k1}/include
    export LIB_DIR=${secp256k1}/lib
  '';

  checkPhase = ''
    py.test tests
  '';

  postPatch = ''
    sed -i '38,45d' setup.py
    substituteInPlace setup.py --replace ", 'pytest-runner==2.6.2'" ""
  '';

  meta = {
    homepage = "https://github.com/ludbb/secp256k1-py";
    description = "Python FFI bindings for secp256k1";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ chris-martin ];
  };
}

{'fraction_non_alphanumeric': 0.12505705157462346, 'fraction_numerical': 0.08352350524874487, 'mean_word_length': 3.473469387755102, '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': '1457219', 'n_tokens_mistral': 951, 'n_tokens_neox': 849, 'n_words': 156}