From 79b79606db2c009a48ba180d0355de204f49e5f0 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 7 Apr 2024 11:35:17 -0400 Subject: [PATCH] python312Packages.sagemaker: fix build by adding patch removing dependency on distutils --- .../python-modules/sagemaker/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/python-modules/sagemaker/default.nix b/pkgs/development/python-modules/sagemaker/default.nix index 4e3b7062d286..42ac9f286844 100644 --- a/pkgs/development/python-modules/sagemaker/default.nix +++ b/pkgs/development/python-modules/sagemaker/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub +, fetchpatch , pythonRelaxDepsHook , attrs , boto3 @@ -38,6 +39,19 @@ buildPythonPackage rec { hash = "sha256-RE4uyIpFiZNDyS5R6+gMLlj0vcAIiHPattFPTSMGnCI="; }; + patches = [ + # Distutils removal, fix build with python 3.12 + # https://github.com/aws/sagemaker-python-sdk/pull/4544 + (fetchpatch { + url = "https://github.com/aws/sagemaker-python-sdk/commit/84447ba59e544c810aeb842fd058e20d89e3fc74.patch"; + hash = "sha256-B8Q18ViB7xYy1F5LoL1NvXj2lnFPgt+C9wssSODyAXM="; + }) + (fetchpatch { + url = "https://github.com/aws/sagemaker-python-sdk/commit/e9e08a30cb42d4b2d7299c1c4b42d680a8c78110.patch"; + hash = "sha256-uGPtXSXfeaIvt9kkZZKQDuiZfoRgw3teffuxai1kKlY="; + }) + ]; + nativeBuildInputs = [ pythonRelaxDepsHook ];