2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, aiobotocore
|
|
|
|
, boto3
|
|
|
|
, buildPythonPackage
|
|
|
|
, dvc-objects
|
|
|
|
, fetchPypi
|
|
|
|
, flatten-dict
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, s3fs
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools-scm
|
|
|
|
}:
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dvc-s3";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.0.1";
|
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-ax2Wsjfvu4hoF99eDPT2sbFhl30wuYtGdEonYCCkJMY=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Prevent circular dependency
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonRemoveDeps = [
|
|
|
|
"dvc"
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
# dvc-s3 uses boto3 directly, we add in propagatedBuildInputs
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace 'aiobotocore[boto3]' 'aiobotocore'
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
aiobotocore
|
|
|
|
boto3
|
|
|
|
dvc-objects
|
|
|
|
flatten-dict s3fs
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Network access is needed for tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Circular dependency
|
|
|
|
# pythonImportsCheck = [
|
|
|
|
# "dvc_s3"
|
|
|
|
# ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "s3 plugin for dvc";
|
|
|
|
homepage = "https://pypi.org/project/dvc-s3/${version}";
|
|
|
|
changelog = "https://github.com/iterative/dvc-s3/releases/tag/${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ melling ];
|
|
|
|
};
|
|
|
|
}
|