<commit_before>{ stdenv
, buildPythonPackage
, pkgs
, requests
, numpy
, graphviz
, python
, isPy3k
}:

buildPythonPackage rec {
  inherit (pkgs.mxnet) name version src meta;

  buildInputs = [ pkgs.mxnet ];
  propagatedBuildInputs = [ requests numpy graphviz ];

  LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ pkgs.mxnet ];

  doCheck = !isPy3k;

  postPatch = ''
    substituteInPlace python/setup.py \
    --replace "graphviz<0.9.0" "graphviz<0.10.0" \
    --replace "numpy<=1.15.0" "numpy<1.16.0" \
    --replace "requests<2.19.0" "requests<2.20.0"
  '';

  preConfigure = ''
    cd python
  '';

  postInstall = ''
    rm -rf $out/mxnet
    ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
  '';

}
<commit_msg>pythonPackages.mxnet: Fix build (#56848)<commit_after>{ stdenv
, buildPythonPackage
, pkgs
, requests
, numpy
, graphviz
, python
, isPy3k
}:

buildPythonPackage rec {
  inherit (pkgs.mxnet) name version src meta;

  buildInputs = [ pkgs.mxnet ];
  propagatedBuildInputs = [ requests numpy graphviz ];

  LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ pkgs.mxnet ];

  doCheck = !isPy3k;

  postPatch = ''
    substituteInPlace python/setup.py \
      --replace "graphviz<0.9.0," "graphviz" \
      --replace "numpy<=1.15.0," "numpy" \
      --replace "requests<2.19.0," "requests"
  '';

  preConfigure = ''
    cd python
  '';

  postInstall = ''
    rm -rf $out/mxnet
    ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
  '';

}

{'fraction_non_alphanumeric': 0.15472203616878769, 'fraction_numerical': 0.028801071667782986, 'mean_word_length': 3.115702479338843, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4885674', 'n_tokens_mistral': 608, 'n_tokens_neox': 581, 'n_words': 105}