<commit_before>{ lib
, buildPythonPackage
, fetchPypi
}:

buildPythonPackage rec {
  pname = "bsdiff4";
  version = "1.2.2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-GICsP1KmxGrmvMbbEX5Ps1+bDM1a91/U/uaQfQDWmDw=";
  };

  checkPhase = ''
    mv bsdiff4 _bsdiff4
    python -c 'import bsdiff4; bsdiff4.test()'
  '';

  meta = with lib; {
    description = "binary diff and patch using the BSDIFF4-format";
    homepage = "https://github.com/ilanschnell/bsdiff4";
    license = licenses.bsdProtection;
    maintainers = with maintainers; [ ris ];<commit_msg>python3Packages.bsdiff4: add pythonImportsCheck<commit_after>{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
}:

buildPythonPackage rec {
  pname = "bsdiff4";
  version = "1.2.2";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-GICsP1KmxGrmvMbbEX5Ps1+bDM1a91/U/uaQfQDWmDw=";
  };

  pythonImportsCheck = [
    "bsdiff4"
  ];

  checkPhase = ''
    mv bsdiff4 _bsdiff4
    python -c 'import bsdiff4; bsdiff4.test()'
  '';

  meta = with lib; {
    description = "Binary diff and patch using the BSDIFF4-format";
    homepage = "https://github.com/ilanschnell/bsdiff4";
    license = licenses.bsdProtection;
    maintainers = with maintainers; [ ris ];
{'fraction_non_alphanumeric': 0.12319391634980989, 'fraction_numerical': 0.0349809885931559, 'mean_word_length': 3.52233676975945, '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': '7386043', 'n_tokens_mistral': 527, 'n_tokens_neox': 494, 'n_words': 100}