<commit_before>{ buildPythonPackage
, fetchurl
, fetchpatch
, nose
, lib
}:

buildPythonPackage rec {
  pname = "xlwt";
  name = "${pname}-${version}";
  version = "1.1.2";

  src = fetchurl {
    url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
    sha256 = "aed648c17731f40f84550dd2a1aaa53569f0cbcaf5610ba895cd2632587b723c";
  };

  # re.LOCALE was removed in Python 3.6
  patches = [
    (fetchpatch {
      url = "https://github.com/python-excel/xlwt/commit/86564ef26341020316cd8a27c704ef1dc5a6129b.patch";
      sha256 = "01abxfkmckcxpi6n5wi8ia58fmkzqrxjfjq1mjljygylm8nb3m8i";
    })
  ];

  buildInputs = [ nose ];
  checkPhase = ''
    nosetests -v
  '';

  meta = {
    description = "Library to create spreadsheet files compatible with MS";
    homepage = https://github.com/python-excel/xlwt;<commit_msg>pythonPackages.xlwt: fix patch hash<commit_after>{ buildPythonPackage
, fetchurl
, fetchpatch
, nose
, lib
}:

buildPythonPackage rec {
  pname = "xlwt";
  name = "${pname}-${version}";
  version = "1.1.2";

  src = fetchurl {
    url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
    sha256 = "aed648c17731f40f84550dd2a1aaa53569f0cbcaf5610ba895cd2632587b723c";
  };

  # re.LOCALE was removed in Python 3.6
  patches = [
    (fetchpatch {
      url = "https://github.com/python-excel/xlwt/commit/86564ef26341020316cd8a27c704ef1dc5a6129b.patch";
      sha256 = "0ifavfld3rrqjb0iyriy4c0drw31gszvlg3nmnn9dmfsh91vxhs6";
    })
  ];

  buildInputs = [ nose ];
  checkPhase = ''
    nosetests -v
  '';

  meta = {
    description = "Library to create spreadsheet files compatible with MS";
    homepage = https://github.com/python-excel/xlwt;
{'fraction_non_alphanumeric': 0.13801169590643275, 'fraction_numerical': 0.10818713450292397, 'mean_word_length': 3.662125340599455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1363149', 'n_tokens_mistral': 778, 'n_tokens_neox': 680, 'n_words': 106}