1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools-scm,
7 hatchling,
8 hatch-vcs,
9 nipreps-versions,
10 pybids,
11 requests,
12 tqdm,
13}:
14
15buildPythonPackage rec {
16 pname = "templateflow";
17 version = "25.0.3";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "templateflow";
24 repo = "python-client";
25 tag = version;
26 hash = "sha256-5LGAuDaJzc2asM5EPOVuOxZwpV0LQNBhMhYKHJlXHmE=";
27 };
28
29 build-system = [
30 setuptools-scm
31 hatchling
32 hatch-vcs
33 ];
34
35 dependencies = [
36 nipreps-versions
37 pybids
38 requests
39 tqdm
40 ];
41
42 doCheck = false; # most tests try to download data
43
44 postFixup = ''
45 export HOME=$(mktemp -d)
46 '';
47
48 pythonImportsCheck = [ "templateflow" ];
49
50 meta = with lib; {
51 homepage = "https://templateflow.org/python-client";
52 description = "Python API to query TemplateFlow via pyBIDS";
53 changelog = "https://github.com/templateflow/python-client/releases/tag/${src.tag}";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ bcdarwin ];
56 };
57}