python310Packages.pyxnat: 1.5 -> 1.6
Also enabled tests and added changelog.
This commit is contained in:
parent
4400df88f8
commit
a5fd93b951
@ -1,21 +1,27 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, nose
|
||||
, pytestCheckHook
|
||||
, lxml
|
||||
, matplotlib
|
||||
, networkx
|
||||
, pandas
|
||||
, requests
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyxnat";
|
||||
version = "1.5";
|
||||
disabled = pythonOlder "3.7";
|
||||
version = "1.6";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-Y8mj6OfZXyE1q3C8HyVzGySuZB6rLSsL/CV/7axxaec=";
|
||||
# PyPI dist missing test configuration files:
|
||||
src = fetchFromGitHub {
|
||||
owner = "pyxnat";
|
||||
repo = "pyxnat";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-QejYisvQFN7CsDOx9wAgTHmRZcSEqgIr8twG4XucfZ4=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -30,17 +36,37 @@ buildPythonPackage rec {
|
||||
substituteInPlace setup.py \
|
||||
--replace "pathlib>=1.0" "" \
|
||||
--replace "future>=0.16" ""
|
||||
sed -i '/--cov/d' setup.cfg
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ nose ];
|
||||
checkPhase = "nosetests pyxnat/tests";
|
||||
doCheck = false; # requires a docker container running an XNAT server
|
||||
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"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pyxnat" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pyxnat.github.io/pyxnat";
|
||||
description = "Python API to XNAT";
|
||||
changelog = "https://github.com/pyxnat/pyxnat/releases/tag/${version}";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ bcdarwin ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user