2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-03-20 04:20:00 +00:00
|
|
|
, pythonOlder
|
2020-09-25 04:45:31 +00:00
|
|
|
, nose
|
|
|
|
, lxml
|
|
|
|
, requests
|
2021-05-20 23:08:51 +00:00
|
|
|
, six
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyxnat";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "1.5";
|
2021-03-20 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-Y8mj6OfZXyE1q3C8HyVzGySuZB6rLSsL/CV/7axxaec=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lxml
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
# future is not used, and pathlib is installed part of python38+
|
|
|
|
# w/o an external package
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pathlib>=1.0" "" \
|
|
|
|
--replace "future>=0.16" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nose ];
|
2020-09-25 04:45:31 +00:00
|
|
|
checkPhase = "nosetests pyxnat/tests";
|
|
|
|
doCheck = false; # requires a docker container running an XNAT server
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyxnat" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://pyxnat.github.io/pyxnat";
|
|
|
|
description = "Python API to XNAT";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|