<commit_before>{ stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPyPy
, flask
, pyquery
, pytest
, pytestrunner
, cairosvg
, tinycss
, cssselect
, lxml
}:

buildPythonPackage rec {
  pname = "pygal";
  version = "2.4.0";

  doCheck = !isPyPy; # one check fails with pypy

  src = fetchPypi {
    inherit pname version;
    sha256 = "9204f05380b02a8a32f9bf99d310b51aa2a932cba5b369f7a4dc3705f0a4ce83";
  };
  patches = [
    # Fixes compatibility with latest pytest. October 12, 2020.
    # Should be included in the next release after 2.4.0
    (fetchpatch {
      url = "https://github.com/Kozea/pygal/commit/19e5399be18a054b3b293f4a8a2777d2df4f9c18.patch";
      sha256 = "1j0hpcvd2mhi449wmlr0ml9gw4cakqk3av1j79bi2qy86dyrss2l";
    })
  ];

  buildInputs = [
    flask
    pyquery

    # Should be a check input, but upstream lists it under "setup_requires".
    # https://github.com/Kozea/pygal/issues/430
    pytestrunner
  ];

  checkInputs = [
    pytest
  ];

  preCheck = ''
    # necessary on darwin to pass the testsuite
    export LANG=en_US.UTF-8
  '';

  postPatch = ''
    substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
  '';

  propagatedBuildInputs = [ cairosvg tinycss cssselect ]
    ++ stdenv.lib.optionals (!isPyPy) [ lxml ];

  meta = with stdenv.lib; {
    description = "Sexy and simple python charting";
    homepage = "http://www.pygal.org";
    license = licenses.lgpl3;
    maintainers = with maintainers; [ sjourdois ];
  };

}<commit_msg>python3Packages.pygal: update license<commit_after>{ stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPyPy
, flask
, pyquery
, pytest
, pytestrunner
, cairosvg
, tinycss
, cssselect
, lxml
}:

buildPythonPackage rec {
  pname = "pygal";
  version = "2.4.0";

  doCheck = !isPyPy; # one check fails with pypy

  src = fetchPypi {
    inherit pname version;
    sha256 = "9204f05380b02a8a32f9bf99d310b51aa2a932cba5b369f7a4dc3705f0a4ce83";
  };
  patches = [
    # Fixes compatibility with latest pytest. October 12, 2020.
    # Should be included in the next release after 2.4.0
    (fetchpatch {
      url = "https://github.com/Kozea/pygal/commit/19e5399be18a054b3b293f4a8a2777d2df4f9c18.patch";
      sha256 = "1j0hpcvd2mhi449wmlr0ml9gw4cakqk3av1j79bi2qy86dyrss2l";
    })
  ];

  buildInputs = [
    flask
    pyquery

    # Should be a check input, but upstream lists it under "setup_requires".
    # https://github.com/Kozea/pygal/issues/430
    pytestrunner
  ];

  checkInputs = [
    pytest
  ];

  preCheck = ''
    # necessary on darwin to pass the testsuite
    export LANG=en_US.UTF-8
  '';

  postPatch = ''
    substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
  '';

  propagatedBuildInputs = [ cairosvg tinycss cssselect ]
    ++ stdenv.lib.optionals (!isPyPy) [ lxml ];

  meta = with stdenv.lib; {
    description = "Sexy and simple python charting";
    homepage = "http://www.pygal.org";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ sjourdois ];
  };

}
{'fraction_non_alphanumeric': 0.11015262110152621, 'fraction_numerical': 0.07067020570670206, 'mean_word_length': 3.2826704545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '2488436', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1169, 'n_words': 232}