Commit 5cd694ac authored by Robert Schütz's avatar Robert Schütz
Browse files

python312Packages.mxnet: depends on distutils

parent 3e46dff7
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
  lib,
  buildPythonPackage,
  pkgs,
  setuptools,
  distutils,
  requests,
  numpy,
  graphviz,
@@ -12,16 +14,23 @@

buildPythonPackage {
  inherit (pkgs.mxnet) pname version src;
  pyproject = true;

  format = "setuptools";
  build-system = [ setuptools ];

  buildInputs = [ pkgs.mxnet ];
  propagatedBuildInputs = [

  dependencies = [
    distutils
    requests
    numpy
    graphviz
  ];

  pythonRelaxDeps = [
    "graphviz"
  ];

  LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ];

  doCheck = !isPy3k;
@@ -29,9 +38,7 @@ buildPythonPackage {
  postPatch = ''
    # Required to support numpy >=1.24 where np.bool is removed in favor of just bool
    substituteInPlace python/mxnet/numpy/utils.py \
      --replace "bool = onp.bool" "bool = bool"
    substituteInPlace python/setup.py \
      --replace "graphviz<0.9.0," "graphviz"
      --replace-fail "bool = onp.bool" "bool = bool"
  '';

  preConfigure = ''