evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / datalad / default.nix
blob2ab56ef6da2da0909ff0d5ec6d6f30b79f3311da
2   buildPythonPackage,
3   lib,
4   setuptools,
5   stdenv,
6   fetchFromGitHub,
7   installShellFiles,
8   git,
9   coreutils,
10   versioneer,
11   # core
12   platformdirs,
13   chardet,
14   iso8601,
15   humanize,
16   fasteners,
17   packaging,
18   patool,
19   tqdm,
20   annexremote,
21   looseversion,
22   git-annex,
23   # downloaders
24   boto3,
25   keyrings-alt,
26   keyring,
27   msgpack,
28   requests,
29   # publish
30   python-gitlab,
31   # misc
32   argcomplete,
33   pyperclip,
34   python-dateutil,
35   # duecredit
36   duecredit,
37   # python>=3.8
38   distro,
39   # win
40   colorama,
41   # python-version-dependent
42   pythonOlder,
43   importlib-resources,
44   importlib-metadata,
45   typing-extensions,
46   # tests
47   pytestCheckHook,
48   p7zip,
49   curl,
50   httpretty,
53 buildPythonPackage rec {
54   pname = "datalad";
55   version = "1.1.3";
57   src = fetchFromGitHub {
58     owner = "datalad";
59     repo = pname;
60     rev = "refs/tags/${version}";
61     hash = "sha256-Y7P9vRfFUJ5ZhVRTAYeImI9cv1LtWVAeBoBl6wANnrc=";
62   };
64   postPatch = ''
65     substituteInPlace datalad/distribution/create_sibling.py \
66       --replace-fail "/bin/ls" "${coreutils}/bin/ls"
67     # Remove vendorized versioneer.py
68     rm versioneer.py
69   '';
71   nativeBuildInputs = [
72     installShellFiles
73     git
74   ];
76   build-system = [
77     setuptools
78     versioneer
79   ];
81   dependencies =
82     [
83       # core
84       platformdirs
85       chardet
86       iso8601
87       humanize
88       fasteners
89       packaging
90       patool
91       tqdm
92       annexremote
93       looseversion
94       setuptools
95       git-annex
97       # downloaders-extra
98       # requests-ftp # not in nixpkgs yet
100       # downloaders
101       boto3
102       keyrings-alt
103       keyring
104       msgpack
105       requests
107       # publish
108       python-gitlab
110       # misc
111       argcomplete
112       pyperclip
113       python-dateutil
115       # duecredit
116       duecredit
118       # python>=3.8
119       distro
120     ]
121     ++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ]
122     ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]
123     ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]
124     ++ lib.optionals (pythonOlder "3.11") [ typing-extensions ];
126   postInstall = ''
127     installShellCompletion --cmd datalad \
128          --bash <($out/bin/datalad shell-completion) \
129          --zsh  <($out/bin/datalad shell-completion)
130     wrapProgram $out/bin/datalad --prefix PYTHONPATH : "$PYTHONPATH"
131   '';
133   preCheck = ''
134     export HOME=$TMPDIR
135   '';
137   # tests depend on apps in $PATH which only will get installed after the test
138   disabledTests = [
139     # No such file or directory: 'datalad'
140     "test_script_shims"
141     "test_cfg_override"
142     "test_completion"
143     "test_nested_pushclone_cycle_allplatforms"
144     "test_create_sub_gh3463"
145     "test_create_sub_dataset_dot_no_path"
146     "test_cfg_passthrough"
147     "test_addurls_stdin_input_command_line"
148     "test_run_datalad_help"
149     "test_status_custom_summary_no_repeats"
150     "test_quoting"
152     #  No such file or directory: 'git-annex-remote-[...]"
153     "test_create"
154     "test_ensure_datalad_remote_maybe_enable"
156     # "git-annex: unable to use external special remote git-annex-remote-datalad"
157     "test_ria_postclonecfg"
158     "test_ria_postclone_noannex"
159     "test_ria_push"
160     "test_basic_scenario"
161     "test_annex_get_from_subdir"
162     "test_ensure_datalad_remote_init_and_enable_needed"
163     "test_ensure_datalad_remote_maybe_enable[False]"
164     "test_ensure_datalad_remote_maybe_enable[True]"
165     "test_create_simple"
166     "test_create_alias"
167     "test_storage_only"
168     "test_initremote"
169     "test_read_access"
170     "test_ephemeral"
171     "test_initremote_basic_fileurl"
172     "test_initremote_basic_httpurl"
173     "test_remote_layout"
174     "test_version_check"
175     "test_gitannex_local"
176     "test_push_url"
177     "test_url_keys"
178     "test_obtain_permission_root"
179     "test_source_candidate_subdataset"
180     "test_update_fetch_all"
181     "test_add_archive_dirs"
182     "test_add_archive_content"
183     "test_add_archive_content_strip_leading"
184     "test_add_archive_content_zip"
185     "test_add_archive_content_absolute_path"
186     "test_add_archive_use_archive_dir"
187     "test_add_archive_single_file"
188     "test_add_delete"
189     "test_add_archive_leading_dir"
190     "test_add_delete_after_and_drop"
191     "test_add_delete_after_and_drop_subdir"
192     "test_override_existing_under_git"
193     "test_copy_file_datalad_specialremote"
194     "test_download_url_archive"
195     "test_download_url_archive_from_subdir"
196     "test_download_url_archive_trailing_separator"
197     "test_download_url_need_datalad_remote"
198     "test_datalad_credential_helper - assert False"
200     # need internet access
201     "test_clone_crcns"
202     "test_clone_datasets_root"
203     "test_reckless"
204     "test_autoenabled_remote_msg"
205     "test_ria_http_storedataladorg"
206     "test_gin_cloning"
207     "test_nonuniform_adjusted_subdataset"
208     "test_install_datasets_root"
209     "test_install_simple_local"
210     "test_install_dataset_from_just_source"
211     "test_install_dataset_from_just_source_via_path"
212     "test_datasets_datalad_org"
213     "test_get_cached_dataset"
214     "test_cached_dataset"
215     "test_cached_url"
216     "test_anonymous_s3"
217     "test_protocols"
218     "test_get_versioned_url_anon"
219     "test_install_recursive_github"
220     "test_failed_install_multiple"
222     # pbcopy not found
223     "test_wtf"
224   ];
226   nativeCheckInputs = [
227     p7zip
228     pytestCheckHook
229     git-annex
230     curl
231     httpretty
232   ];
234   pythonImportsCheck = [ "datalad" ];
236   meta = {
237     description = "Keep code, data, containers under control with git and git-annex";
238     homepage = "https://www.datalad.org";
239     license = lib.licenses.mit;
240     maintainers = with lib.maintainers; [ renesat ];
241   };