python311Packages.monai: patch out distutils usage

Allows building the package with Python 3.12.
This commit is contained in:
Ben Darwin
2024-07-03 23:56:10 -04:00
parent 6842b06197
commit 52a4afce4b
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pythonOlder,
pythonAtLeast,
ninja,
@@ -16,8 +17,7 @@ buildPythonPackage rec {
pname = "monai";
version = "1.3.1";
pyproject = true;
# upper bound due to use of `distutils`; remove after next release:
disabled = pythonOlder "3.8" || pythonAtLeast "3.12";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Project-MONAI";
@@ -26,6 +26,14 @@ buildPythonPackage rec {
hash = "sha256-YjEJbDM9+PiC3Kse8NA/b/yJBsReaK6yIyEB9uktiEc=";
};
patches = [
(fetchpatch {
name = "remove-distutils";
url = "https://github.com/Project-MONAI/MONAI/commit/87862f0d5730d42d282e779fc1450f18b4869863.patch";
hash = "sha256-wApYfugDPWcuxwmd91peNqc0+l+SoMlT8hhx99oI2Co=";
})
];
preBuild = ''
export MAX_JOBS=$NIX_BUILD_CORES;
'';