1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 boto3, 11 importlib-metadata, 12 jsonschema, 13 mock, 14 platformdirs, 15 pydantic, 16 pyyaml, 17 rich, 18 19 # optional-dependencies 20 black, 21 pandas, 22 pylint, 23 pytest, 24 25 # tests 26 pytestCheckHook, 27}: 28 29buildPythonPackage rec { 30 pname = "sagemaker-core"; 31 version = "1.0.59"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "aws"; 36 repo = "sagemaker-core"; 37 tag = "v${version}"; 38 hash = "sha256-h+59FAadpOX9BFl3bnGTDmNOn3oQuPvKyxgfTQ+62g4="; 39 }; 40 41 build-system = [ 42 setuptools 43 ]; 44 45 pythonRelaxDeps = [ 46 "boto3" 47 "importlib-metadata" 48 "mock" 49 "rich" 50 ]; 51 52 dependencies = [ 53 boto3 54 importlib-metadata 55 jsonschema 56 mock 57 platformdirs 58 pydantic 59 pyyaml 60 rich 61 ]; 62 63 optional-dependencies = { 64 codegen = [ 65 black 66 pandas 67 pylint 68 pytest 69 ]; 70 }; 71 72 pythonImportsCheck = [ 73 "sagemaker_core" 74 ]; 75 76 nativeCheckInputs = [ 77 pytestCheckHook 78 ] 79 ++ lib.flatten (lib.attrValues optional-dependencies); 80 81 disabledTestPaths = [ 82 # Tries to import deprecated `sklearn` 83 "integ/test_codegen.py" 84 85 # botocore.exceptions.NoRegionError: You must specify a region 86 "tst/generated/test_logs.py" 87 ]; 88 89 meta = { 90 description = "Python object-oriented interface for interacting with Amazon SageMaker resources"; 91 homepage = "https://github.com/aws/sagemaker-core"; 92 changelog = "https://github.com/aws/sagemaker-core/blob/${src.tag}/CHANGELOG.md"; 93 license = lib.licenses.asl20; 94 maintainers = with lib.maintainers; [ GaetanLepage ]; 95 }; 96}