Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / dvc / default.nix
blobf9190e727a1daedceab9ad5aa6a0f1fdc3d65822
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   pythonRelaxDepsHook,
40   requests,
41   rich,
42   ruamel-yaml,
43   scmrepo,
44   setuptools-scm,
45   shortuuid,
46   shtab,
47   tabulate,
48   tomlkit,
49   tqdm,
50   typing-extensions,
51   voluptuous,
52   zc-lockfile,
53   enableGoogle ? false,
54   enableAWS ? false,
55   enableAzure ? false,
56   enableSSH ? false,
59 buildPythonPackage rec {
60   pname = "dvc";
61   version = "3.50.0";
62   pyproject = true;
64   disabled = pythonOlder "3.8";
66   src = fetchFromGitHub {
67     owner = "iterative";
68     repo = "dvc";
69     rev = "refs/tags/${version}";
70     hash = "sha256-/MvKWpJzKWLj1+y8nPMQiAwdktmQyJNM+s6ctYNk9u0=";
71   };
73   pythonRelaxDeps = [
74     "dvc-data"
75     "platformdirs"
76   ];
78   postPatch = ''
79     substituteInPlace dvc/analytics.py \
80       --replace-fail 'enabled = not os.getenv(DVC_NO_ANALYTICS)' 'enabled = False'
81     substituteInPlace dvc/daemon.py \
82       --subst-var-by dvc "$out/bin/dcv"
83   '';
85   build-system = [ setuptools-scm ];
87   nativeBuildInputs = [ pythonRelaxDepsHook ];
89   dependencies =
90     [
91       appdirs
92       colorama
93       configobj
94       distro
95       dpath
96       dvc-data
97       dvc-http
98       dvc-render
99       dvc-studio-client
100       dvc-task
101       flatten-dict
102       flufl-lock
103       funcy
104       grandalf
105       gto
106       hydra-core
107       iterative-telemetry
108       networkx
109       packaging
110       pathspec
111       platformdirs
112       psutil
113       pydot
114       pygtrie
115       pyparsing
116       requests
117       rich
118       ruamel-yaml
119       scmrepo
120       shortuuid
121       shtab
122       tabulate
123       tomlkit
124       tqdm
125       typing-extensions
126       voluptuous
127       zc-lockfile
128     ]
129     ++ lib.optionals enableGoogle passthru.optional-dependencies.gs
130     ++ lib.optionals enableAWS passthru.optional-dependencies.s3
131     ++ lib.optionals enableAzure passthru.optional-dependencies.azure
132     ++ lib.optionals enableSSH passthru.optional-dependencies.ssh
133     ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]
134     ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
136   passthru.optional-dependencies = {
137     azure = [ dvc-azure ];
138     gdrive = [ dvc-gdrive ];
139     gs = [ dvc-gs ];
140     hdfs = [ dvc-hdfs ];
141     s3 = [ dvc-s3 ];
142     ssh = [ dvc-ssh ];
143   };
145   # Tests require access to real cloud services
146   doCheck = false;
148   pythonImportsCheck = [
149     "dvc"
150     "dvc.api"
151   ];
153   meta = with lib; {
154     description = "Version Control System for Machine Learning Projects";
155     homepage = "https://dvc.org";
156     changelog = "https://github.com/iterative/dvc/releases/tag/${version}";
157     license = licenses.asl20;
158     maintainers = with maintainers; [
159       cmcdragonkai
160       fab
161     ];
162     mainProgram = "dvc";
163   };