python312Packages.datalad: refactor

This commit is contained in:
natsukium
2024-11-22 09:24:45 +09:00
parent 415b0ea85b
commit 53b61e7a0e
@@ -34,16 +34,15 @@
python-dateutil,
# duecredit
duecredit,
# python>=3.8
distro,
# win
colorama,
# python-version-dependent
pythonOlder,
importlib-resources,
importlib-metadata,
typing-extensions,
# tests
pytest-xdist,
pytestCheckHook,
p7zip,
curl,
@@ -53,10 +52,11 @@
buildPythonPackage rec {
pname = "datalad";
version = "1.1.4";
pyproject = true;
src = fetchFromGitHub {
owner = "datalad";
repo = pname;
repo = "datalad";
rev = "refs/tags/${version}";
hash = "sha256-l3II9xebSq09He5e4GGGiGtfe6ERtIQD00eHKGx46WA=";
};
@@ -79,49 +79,44 @@ buildPythonPackage rec {
];
dependencies =
[
# core
platformdirs
chardet
iso8601
humanize
fasteners
packaging
patool
tqdm
annexremote
looseversion
setuptools
git-annex
optional-dependencies.core ++ optional-dependencies.downloaders ++ optional-dependencies.publish;
# downloaders-extra
# requests-ftp # not in nixpkgs yet
# downloaders
optional-dependencies = {
core =
[
platformdirs
chardet
distro
iso8601
humanize
fasteners
packaging
patool
tqdm
annexremote
looseversion
]
++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ]
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]
++ lib.optionals (pythonOlder "3.11") [ typing-extensions ];
downloaders = [
boto3
keyrings-alt
keyring
msgpack
requests
# publish
python-gitlab
# misc
];
downloaders-extra = [
# requests-ftp # not in nixpkgs yet
];
publish = [ python-gitlab ];
misc = [
argcomplete
pyperclip
python-dateutil
# duecredit
duecredit
# python>=3.8
distro
]
++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ]
++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]
++ lib.optionals (pythonOlder "3.11") [ typing-extensions ];
];
duecredit = [ duecredit ];
};
postInstall = ''
installShellCompletion --cmd datalad \
@@ -228,6 +223,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
p7zip
pytest-xdist
pytestCheckHook
git-annex
curl