python312Packages.mxnet: depends on distutils

This commit is contained in:
Robert Schütz 2024-10-29 10:52:57 -07:00
parent 3e46dff78b
commit 5cd694ac61

View File

@ -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 = ''