nixpkgs/pkgs/development/python-modules/dvc/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

162 lines
2.9 KiB
Nix

{
lib,
appdirs,
buildPythonPackage,
colorama,
configobj,
distro,
dpath,
dvc-azure,
dvc-data,
dvc-gdrive,
dvc-gs,
dvc-hdfs,
dvc-http,
dvc-render,
dvc-s3,
dvc-ssh,
dvc-studio-client,
dvc-task,
fetchFromGitHub,
flatten-dict,
flufl-lock,
funcy,
grandalf,
gto,
hydra-core,
importlib-metadata,
importlib-resources,
iterative-telemetry,
networkx,
packaging,
pathspec,
platformdirs,
psutil,
pydot,
pygtrie,
pyparsing,
pythonOlder,
requests,
rich,
ruamel-yaml,
scmrepo,
setuptools-scm,
shortuuid,
shtab,
tabulate,
tomlkit,
tqdm,
typing-extensions,
voluptuous,
zc-lockfile,
enableGoogle ? false,
enableAWS ? false,
enableAzure ? false,
enableSSH ? false,
}:
buildPythonPackage rec {
pname = "dvc";
version = "3.58.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "iterative";
repo = "dvc";
rev = "refs/tags/${version}";
hash = "sha256-ljrQV+Ca0EooCdoEU1B2mnN62bpKV0ZGnX8W1yZWyjM=";
};
pythonRelaxDeps = [
"dvc-data"
"platformdirs"
];
postPatch = ''
substituteInPlace dvc/analytics.py \
--replace-fail 'enabled = not os.getenv(DVC_NO_ANALYTICS)' 'enabled = False'
substituteInPlace dvc/daemon.py \
--subst-var-by dvc "$out/bin/dcv"
'';
build-system = [ setuptools-scm ];
dependencies =
[
appdirs
colorama
configobj
distro
dpath
dvc-data
dvc-http
dvc-render
dvc-studio-client
dvc-task
flatten-dict
flufl-lock
funcy
grandalf
gto
hydra-core
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
]
++ lib.optionals enableGoogle optional-dependencies.gs
++ lib.optionals enableAWS optional-dependencies.s3
++ lib.optionals enableAzure optional-dependencies.azure
++ lib.optionals enableSSH optional-dependencies.ssh
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]
++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
optional-dependencies = {
azure = [ dvc-azure ];
gdrive = [ dvc-gdrive ];
gs = [ dvc-gs ];
hdfs = [ dvc-hdfs ];
s3 = [ dvc-s3 ];
ssh = [ dvc-ssh ];
};
# Tests require access to real cloud services
doCheck = false;
pythonImportsCheck = [
"dvc"
"dvc.api"
];
meta = with lib; {
description = "Version Control System for Machine Learning Projects";
homepage = "https://dvc.org";
changelog = "https://github.com/iterative/dvc/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [
cmcdragonkai
fab
];
mainProgram = "dvc";
};
}