<commit_before>{ lib, buildPythonPackage, fetchurl, isPy27
, cython, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng }:

buildPythonPackage rec {
  pname = "pygame_sdl2";
  version = "2.1.0";
  renpy_version = "7.2.0";
  name = "${pname}-${version}-${renpy_version}";

  src = fetchurl {
    url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}-for-renpy-${renpy_version}.tar.gz";
    sha256 = "1amgsb6mm8ssf7vdcs5dr8rlxrgyhh29m4i573z1cw61ynd7vgcw";
  };

  # force rebuild of headers needed for install
  prePatch = ''
    rm -rf gen gen3
  '';

  nativeBuildInputs = [
    SDL2.dev cython
  ];

  buildInputs = [
    SDL2 SDL2_image SDL2_ttf SDL2_mixer
    libjpeg libpng
  ];
<commit_msg>pygame_sdl2: Sync version with Ren'Py version<commit_after>{ lib, buildPythonPackage, fetchurl, isPy27, renpy
, cython, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng }:

buildPythonPackage rec {
  pname = "pygame_sdl2";
  version = "2.1.0";
  renpy_version = renpy.base_version;
  name = "${pname}-${version}-${renpy_version}";

  src = fetchurl {
    url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}-for-renpy-${renpy_version}.tar.gz";
    sha256 = "sha256-iKsnmuSBzfHlIOHUwWECfvPa9LuBbCr9Kmq5dolxUlU=";
  };

  # force rebuild of headers needed for install
  prePatch = ''
    rm -rf gen gen3
  '';

  nativeBuildInputs = [
    SDL2.dev cython
  ];

  buildInputs = [
    SDL2 SDL2_image SDL2_ttf SDL2_mixer
    libjpeg libpng
  ];

{'fraction_non_alphanumeric': 0.13602693602693602, 'fraction_numerical': 0.044444444444444446, 'mean_word_length': 3.9042904290429044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5392206', 'n_tokens_mistral': 650, 'n_tokens_neox': 604, 'n_words': 106}