1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, setuptools
6, click
7, isodate
8, progressbar2
9, pydicom
10, requests
11}:
12
13buildPythonPackage rec {
14 pname = "xnatpy";
15 version = "0.5.1";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 pname = "xnat";
22 inherit version;
23 hash = "sha256-iOw9cVWP5Am4S9JQ0NTmtew38KZiKmau+19K2KG2aKQ=";
24 };
25
26 nativeBuildInputs = [ setuptools ];
27
28 propagatedBuildInputs = [
29 click
30 isodate
31 progressbar2
32 pydicom
33 requests
34 ];
35
36 # tests missing in PyPI dist and require network access and Docker container
37 doCheck = false;
38
39 pythonImportsCheck = [ "xnat" ];
40
41 meta = with lib; {
42 homepage = "https://xnat.readthedocs.io";
43 description =
44 "A new XNAT client (distinct from pyxnat) that exposes XNAT objects/functions as Python objects/functions";
45 changelog = "https://gitlab.com/radiology/infrastructure/xnatpy/-/blob/${version}/CHANGELOG?ref_type=tags";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ bcdarwin ];
48 mainProgram = "xnat";
49 };
50}