Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: fix datalad issue #372997

Open
wants to merge 1 commit into
base: release-24.11
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 43 additions & 41 deletions pkgs/development/python-modules/datalad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -52,13 +51,14 @@

buildPythonPackage rec {
pname = "datalad";
version = "1.1.3";
version = "1.1.5";
pyproject = true;

src = fetchFromGitHub {
owner = "datalad";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-Y7P9vRfFUJ5ZhVRTAYeImI9cv1LtWVAeBoBl6wANnrc=";
repo = "datalad";
tag = version;
hash = "sha256-XwzYlSP2MbEb0U3tuVOq3NNqLTS08UzSfSFBidHbpAY=";
};

postPatch = ''
Expand All @@ -79,49 +79,44 @@ buildPythonPackage rec {
];

dependencies =
[
# core
platformdirs
chardet
iso8601
humanize
fasteners
packaging
patool
tqdm
annexremote
looseversion
setuptools
git-annex

# downloaders-extra
# requests-ftp # not in nixpkgs yet

# downloaders
optional-dependencies.core ++ optional-dependencies.downloaders ++ optional-dependencies.publish;

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 \
Expand Down Expand Up @@ -228,12 +223,19 @@ buildPythonPackage rec {

nativeCheckInputs = [
p7zip
pytest-xdist
pytestCheckHook
git-annex
curl
httpretty
];

pytestFlagsArray = [
# Deprecated in 3.13. Use exc_type_str instead.
"-W"
"ignore::DeprecationWarning"
];

pythonImportsCheck = [ "datalad" ];

meta = {
Expand Down