2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-08-04 22:07:22 +00:00
|
|
|
, fetchFromGitHub
|
2021-03-20 04:20:00 +00:00
|
|
|
, pythonOlder
|
2023-08-04 22:07:22 +00:00
|
|
|
, pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
, lxml
|
2023-08-04 22:07:22 +00:00
|
|
|
, matplotlib
|
|
|
|
, networkx
|
|
|
|
, pandas
|
2020-09-25 04:45:31 +00:00
|
|
|
, requests
|
2021-05-20 23:08:51 +00:00
|
|
|
, six
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyxnat";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.6";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2023-08-04 22:07:22 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# PyPI dist missing test configuration files:
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyxnat";
|
|
|
|
repo = "pyxnat";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-QejYisvQFN7CsDOx9wAgTHmRZcSEqgIr8twG4XucfZ4=";
|
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-08-04 22:07:22 +00:00
|
|
|
sed -i '/--cov/d' setup.cfg
|
2021-03-20 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
matplotlib
|
|
|
|
networkx
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
preCheck = ''
|
|
|
|
export PYXNAT_SKIP_NETWORK_TESTS=1
|
|
|
|
'';
|
|
|
|
pytestFlagsArray = [ "pyxnat" ];
|
|
|
|
disabledTestPaths = [
|
|
|
|
# try to access network even though PYXNAT_SKIP_NETWORK_TESTS is set:
|
|
|
|
"pyxnat/tests/pipelines_test.py"
|
|
|
|
"pyxnat/tests/search_test.py"
|
|
|
|
"pyxnat/tests/user_and_project_management_test.py"
|
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
# try to access network even though PYXNAT_SKIP_NETWORK_TESTS is set:
|
|
|
|
"test_ashs_volumes"
|
|
|
|
"test_inspector_structure"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyxnat" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://pyxnat.github.io/pyxnat";
|
|
|
|
description = "Python API to XNAT";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sessionmirror.py";
|
2023-08-04 22:07:22 +00:00
|
|
|
changelog = "https://github.com/pyxnat/pyxnat/releases/tag/${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|