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