<commit_before>{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, sqlite
, isPyPy
, python
, fetchpatch
}:

buildPythonPackage rec {
  pname = "apsw";
  version = "3.39.2.1";
  format = "setuptools";

  disabled = isPyPy;

  src = fetchFromGitHub {
    owner = "rogerbinns";
    repo = "apsw";
    rev = "refs/tags/${version}";
    hash = "sha256-W1uQFya/IQUBAPAjwdCJ1K5LVc4spcYj0dN2YP2vtN0=";
  };

  buildInputs = [
    sqlite
  ];

  patches = [
    # ongoing issue: https://github.com/rogerbinns/apsw/issues/363
    # apsw needs to know the compile flags of sqlite to match features
    (fetchpatch {
      url = "https://github.com/rogerbinns/apsw/commit/e92f019ff785d8e52d381dc541d3f4f8236fb356.patch";
      hash = "sha256-Zdy0ukfWkak9lTdU5WMNzWNp7uDROJgXLcfvQdfm2Oo=";
    })
  ];

  # Project uses custom test setup to exclude some tests by default, so using pytest
  # requires more maintenance
  # https://github.com/rogerbinns/apsw/issues/335
  checkPhase = ''
    ${python.interpreter} setup.py test
  '';

  pythonImportsCheck = [
    "apsw"
  ];

  meta = with lib; {
    description = "A Python wrapper for the SQLite embedded relational database engine";
    homepage = "https://github.com/rogerbinns/apsw";
    license = licenses.zlib;
    maintainers = with maintainers; [ gador ];
  };
}<commit_msg>python3Packages.apsw: 3.39.2.1 -> 3.39.3.0<commit_after>{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, sqlite
, isPyPy
, python
}:

buildPythonPackage rec {
  pname = "apsw";
  version = "3.39.3.0";
  format = "setuptools";

  disabled = isPyPy;

  src = fetchFromGitHub {
    owner = "rogerbinns";
    repo = "apsw";
    rev = "refs/tags/${version}";
    hash = "sha256-rUG6TXGdF+XaRTFn2luffYw+1EEChxtLgQx2Gn+7J6A=";
  };

  buildInputs = [
    sqlite
  ];

  # Project uses custom test setup to exclude some tests by default, so using pytest
  # requires more maintenance
  # https://github.com/rogerbinns/apsw/issues/335
  checkPhase = ''
    ${python.interpreter} setup.py test
  '';

  pythonImportsCheck = [
    "apsw"
  ];

  meta = with lib; {
    description = "A Python wrapper for the SQLite embedded relational database engine";
    homepage = "https://github.com/rogerbinns/apsw";
    license = licenses.zlib;
    maintainers = with maintainers; [ gador ];
  };
}
{'fraction_non_alphanumeric': 0.12516240796881767, 'fraction_numerical': 0.036379385015158076, 'mean_word_length': 3.2936802973977697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '127786', 'n_tokens_mistral': 922, 'n_tokens_neox': 862, 'n_words': 176}