python312Packages.sagemaker: modernize

This commit is contained in:
Nick Cao 2024-04-07 11:43:21 -04:00
parent 79b79606db
commit f3f3c19e46
No known key found for this signature in database

View File

@ -4,6 +4,7 @@
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, pythonRelaxDepsHook , pythonRelaxDepsHook
, setuptools
, attrs , attrs
, boto3 , boto3
, cloudpickle , cloudpickle
@ -21,14 +22,18 @@
, platformdirs , platformdirs
, tblib , tblib
, urllib3 , urllib3
, requests
, docker , docker
, tqdm
, psutil
, scipy , scipy
, accelerate
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "sagemaker"; pname = "sagemaker";
version = "2.214.3"; version = "2.214.3";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -52,16 +57,17 @@ buildPythonPackage rec {
}) })
]; ];
nativeBuildInputs = [ build-system = [
setuptools
pythonRelaxDepsHook pythonRelaxDepsHook
]; ];
pythonRelaxDeps = [ pythonRelaxDeps = [
"attrs" "cloudpickle"
"boto3" "importlib-metadata"
]; ];
propagatedBuildInputs = [ dependencies = [
attrs attrs
boto3 boto3
cloudpickle cloudpickle
@ -78,6 +84,11 @@ buildPythonPackage rec {
jsonschema jsonschema
platformdirs platformdirs
tblib tblib
urllib3
requests
docker
tqdm
psutil
]; ];
doCheck = false; # many test dependencies are not available in nixpkgs doCheck = false; # many test dependencies are not available in nixpkgs
@ -90,6 +101,7 @@ buildPythonPackage rec {
passthru.optional-dependencies = { passthru.optional-dependencies = {
local = [ urllib3 docker pyyaml ]; local = [ urllib3 docker pyyaml ];
scipy = [ scipy ]; scipy = [ scipy ];
huggingface = [ accelerate ];
# feature-processor = [ pyspark sagemaker-feature-store-pyspark ]; # not available in nixpkgs # feature-processor = [ pyspark sagemaker-feature-store-pyspark ]; # not available in nixpkgs
}; };