1{
2 lib,
3 aiobotocore,
4 boto3,
5 buildPythonPackage,
6 dvc-objects,
7 fetchPypi,
8 flatten-dict,
9 s3fs,
10 setuptools-scm,
11}:
12
13buildPythonPackage rec {
14 pname = "dvc-s3";
15 version = "3.2.2";
16 pyproject = true;
17
18 src = fetchPypi {
19 pname = "dvc_s3";
20 inherit version;
21 hash = "sha256-Dqcsm2sADf6hqDTUEGczts3HRdCm7h1cCluMg0RnFxY=";
22 };
23
24 # Prevent circular dependency
25 pythonRemoveDeps = [ "dvc" ];
26
27 # dvc-s3 uses boto3 directly, we add in propagatedBuildInputs
28 postPatch = ''
29 substituteInPlace pyproject.toml \
30 --replace-fail "aiobotocore[boto3]" "aiobotocore"
31 '';
32
33 build-system = [ setuptools-scm ];
34
35 dependencies = [
36 aiobotocore
37 boto3
38 dvc-objects
39 flatten-dict
40 s3fs
41 ];
42
43 # Network access is needed for tests
44 doCheck = false;
45
46 # Circular dependency
47 # pythonImportsCheck = [
48 # "dvc_s3"
49 # ];
50
51 meta = with lib; {
52 description = "S3 plugin for dvc";
53 homepage = "https://pypi.org/project/dvc-s3/${version}";
54 changelog = "https://github.com/iterative/dvc-s3/releases/tag/${version}";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ melling ];
57 };
58}