biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / dvc / default.nix
blobee197c22044c2ac5b54cdfea112f2d8211eabc24
2   lib,
3   appdirs,
4   buildPythonPackage,
5   colorama,
6   configobj,
7   distro,
8   dpath,
9   dvc-azure,
10   dvc-data,
11   dvc-gdrive,
12   dvc-gs,
13   dvc-hdfs,
14   dvc-http,
15   dvc-render,
16   dvc-s3,
17   dvc-ssh,
18   dvc-studio-client,
19   dvc-task,
20   fetchFromGitHub,
21   flatten-dict,
22   flufl-lock,
23   funcy,
24   grandalf,
25   gto,
26   hydra-core,
27   importlib-metadata,
28   importlib-resources,
29   iterative-telemetry,
30   networkx,
31   packaging,
32   pathspec,
33   platformdirs,
34   psutil,
35   pydot,
36   pygtrie,
37   pyparsing,
38   pythonOlder,
39   requests,
40   rich,
41   ruamel-yaml,
42   scmrepo,
43   setuptools-scm,
44   shortuuid,
45   shtab,
46   tabulate,
47   tomlkit,
48   tqdm,
49   typing-extensions,
50   voluptuous,
51   zc-lockfile,
52   enableGoogle ? false,
53   enableAWS ? false,
54   enableAzure ? false,
55   enableSSH ? false,
58 buildPythonPackage rec {
59   pname = "dvc";
60   version = "3.55.2";
61   pyproject = true;
63   disabled = pythonOlder "3.8";
65   src = fetchFromGitHub {
66     owner = "iterative";
67     repo = "dvc";
68     rev = "refs/tags/${version}";
69     hash = "sha256-yNnOSYh4lCefTnIgNstsKaRbrPCgSiWEgKeF66KD66k=";
70   };
72   pythonRelaxDeps = [
73     "dvc-data"
74     "platformdirs"
75   ];
77   postPatch = ''
78     substituteInPlace dvc/analytics.py \
79       --replace-fail 'enabled = not os.getenv(DVC_NO_ANALYTICS)' 'enabled = False'
80     substituteInPlace dvc/daemon.py \
81       --subst-var-by dvc "$out/bin/dcv"
82   '';
84   build-system = [ setuptools-scm ];
87   dependencies =
88     [
89       appdirs
90       colorama
91       configobj
92       distro
93       dpath
94       dvc-data
95       dvc-http
96       dvc-render
97       dvc-studio-client
98       dvc-task
99       flatten-dict
100       flufl-lock
101       funcy
102       grandalf
103       gto
104       hydra-core
105       iterative-telemetry
106       networkx
107       packaging
108       pathspec
109       platformdirs
110       psutil
111       pydot
112       pygtrie
113       pyparsing
114       requests
115       rich
116       ruamel-yaml
117       scmrepo
118       shortuuid
119       shtab
120       tabulate
121       tomlkit
122       tqdm
123       typing-extensions
124       voluptuous
125       zc-lockfile
126     ]
127     ++ lib.optionals enableGoogle optional-dependencies.gs
128     ++ lib.optionals enableAWS optional-dependencies.s3
129     ++ lib.optionals enableAzure optional-dependencies.azure
130     ++ lib.optionals enableSSH optional-dependencies.ssh
131     ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]
132     ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
134   optional-dependencies = {
135     azure = [ dvc-azure ];
136     gdrive = [ dvc-gdrive ];
137     gs = [ dvc-gs ];
138     hdfs = [ dvc-hdfs ];
139     s3 = [ dvc-s3 ];
140     ssh = [ dvc-ssh ];
141   };
143   # Tests require access to real cloud services
144   doCheck = false;
146   pythonImportsCheck = [
147     "dvc"
148     "dvc.api"
149   ];
151   meta = with lib; {
152     description = "Version Control System for Machine Learning Projects";
153     homepage = "https://dvc.org";
154     changelog = "https://github.com/iterative/dvc/releases/tag/${version}";
155     license = licenses.asl20;
156     maintainers = with maintainers; [
157       cmcdragonkai
158       fab
159     ];
160     mainProgram = "dvc";
161   };