<commit_before>{ stdenv
, lib
, fetchpatch
, buildPythonPackage
, fetchPypi
, pythonOlder
, swig2
, openssl
, typing
}:


buildPythonPackage rec {
  version = "0.35.2";
  pname = "M2Crypto";

  src = fetchPypi {
    inherit pname version;
    sha256 = "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/void-linux/void-packages/raw/7946d12eb3d815e5ecd4578f1a6133d948694370/srcpkgs/python-M2Crypto/patches/libressl.patch";
      sha256 = "0z5qnkndg6ma5f5qqrid5m95i9kybsr000v3fdy1ab562kf65a27";
    })
  ];
  patchFlags = [ "-p0" ];

  nativeBuildInputs = [ swig2 ];
  buildInputs = [ swig2 openssl ];

  propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;

  preConfigure = ''
    substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${openssl.dev}'"
  '';

  doCheck = false; # another test that depends on the network.

  meta = with stdenv.lib; {
    description = "A Python crypto and SSL toolkit";
    homepage = "https://gitlab.com/m2crypto/m2crypto";
    license = licenses.mit;
    maintainers = with maintainers; [ andrew-d ];
  };

}
<commit_msg>python-m2crypto: update to version 0.36.0<commit_after>{ stdenv
, lib
, fetchpatch
, buildPythonPackage
, fetchPypi
, pythonOlder
, swig2
, openssl
, typing
}:


buildPythonPackage rec {
  version = "0.36.0";
  pname = "M2Crypto";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1hadbdckmjzfb8qzbkafypin6sakfx35j2qx0fsivh757s7c2hhm";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/void-linux/void-packages/raw/7946d12eb3d815e5ecd4578f1a6133d948694370/srcpkgs/python-M2Crypto/patches/libressl.patch";
      sha256 = "0z5qnkndg6ma5f5qqrid5m95i9kybsr000v3fdy1ab562kf65a27";
    })
  ];
  patchFlags = [ "-p0" ];

  nativeBuildInputs = [ swig2 ];
  buildInputs = [ swig2 openssl ];

  propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;

  preConfigure = ''
    substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${openssl.dev}'"
  '';

  doCheck = false; # another test that depends on the network.

  meta = with stdenv.lib; {
    description = "A Python crypto and SSL toolkit";
    homepage = "https://gitlab.com/m2crypto/m2crypto";
    license = licenses.mit;
    maintainers = with maintainers; [ andrew-d ];
  };

}

{'fraction_non_alphanumeric': 0.12774957698815567, 'fraction_numerical': 0.07487309644670051, 'mean_word_length': 3.655511811023622, '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': '4550273', 'n_tokens_mistral': 1010, 'n_tokens_neox': 926, 'n_words': 156}