dvc: move to python-modules since dvclive depends on it

This follows the best practices in the documentation.
This commit is contained in:
Theodore Ni 2023-08-03 11:52:37 -07:00
parent d85f641287
commit a230b18ebe
No known key found for this signature in database
GPG Key ID: 48B67583BDDD4474
4 changed files with 66 additions and 15 deletions

View File

@ -1,14 +1,59 @@
{ lib
, python3
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pythonOlder
, pythonRelaxDepsHook
, setuptools-scm
, appdirs
, colorama
, configobj
, distro
, dpath
, dvc-azure
, dvc-data
, dvc-gs
, dvc-http
, dvc-render
, dvc-s3
, dvc-ssh
, dvc-studio-client
, dvc-task
, flatten-dict
, flufl_lock
, funcy
, grandalf
, hydra-core
, importlib-metadata
, importlib-resources
, iterative-telemetry
, networkx
, packaging
, pathspec
, platformdirs
, psutil
, pydot
, pygtrie
, pyparsing
, requests
, rich
, ruamel-yaml
, scmrepo
, shortuuid
, shtab
, tabulate
, tomlkit
, tqdm
, typing-extensions
, voluptuous
, zc_lockfile
, enableGoogle ? false
, enableAWS ? false
, enableAzure ? false
, enableSSH ? false
}:
python3.pkgs.buildPythonApplication rec {
buildPythonPackage rec {
pname = "dvc";
version = "3.8.1";
format = "pyproject";
@ -31,12 +76,12 @@ python3.pkgs.buildPythonApplication rec {
--subst-var-by dvc "$out/bin/dcv"
'';
nativeBuildInputs = with python3.pkgs; [
nativeBuildInputs = [
pythonRelaxDepsHook
setuptools-scm
];
propagatedBuildInputs = with python3.pkgs; [
propagatedBuildInputs = [
appdirs
colorama
configobj
@ -73,20 +118,24 @@ python3.pkgs.buildPythonApplication rec {
typing-extensions
voluptuous
zc_lockfile
] ++ lib.optionals enableGoogle [
dvc-gs
] ++ lib.optionals enableAWS [
dvc-s3
] ++ lib.optionals enableAzure [
dvc-azure
] ++ lib.optionals enableSSH [
dvc-ssh
] ++ lib.optionals (pythonOlder "3.8") [
]
++ lib.optionals enableGoogle passthru.optional-dependencies.gs
++ lib.optionals enableAWS passthru.optional-dependencies.s3
++ lib.optionals enableAzure passthru.optional-dependencies.azure
++ lib.optionals enableSSH passthru.optional-dependencies.ssh
++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
] ++ lib.optionals (pythonOlder "3.9") [
importlib-resources
];
passthru.optional-dependencies = {
azure = [ dvc-azure ];
gs = [ dvc-gs ];
s3 = [ dvc-s3 ];
ssh = [ dvc-ssh ];
};
# Tests require access to real cloud services
doCheck = false;

View File

@ -4992,9 +4992,9 @@ with pkgs;
duperemove = callPackage ../tools/filesystems/duperemove { };
dvc = callPackage ../applications/version-management/dvc { };
dvc = with python3.pkgs; toPythonApplication dvc;
dvc-with-remotes = callPackage ../applications/version-management/dvc {
dvc-with-remotes = dvc.override {
enableGoogle = true;
enableAWS = true;
enableAzure = true;

View File

@ -3183,6 +3183,8 @@ self: super: with self; {
durus = callPackage ../development/python-modules/durus { };
dvc = callPackage ../development/python-modules/dvc { };
dvc-azure = callPackage ../development/python-modules/dvc-azure { };
dvc-data = callPackage ../development/python-modules/dvc-data { };