nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 82 lines 2.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pytest-cov-stub, 7 lxml, 8 matplotlib, 9 networkx, 10 pandas, 11 requests, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "pyxnat"; 17 version = "1.6.4"; 18 pyproject = true; 19 20 # PyPI dist missing test configuration files: 21 src = fetchFromGitHub { 22 owner = "pyxnat"; 23 repo = "pyxnat"; 24 tag = version; 25 hash = "sha256-Dhidc5KOzx/S0sr4D7Oc8lvSDT0y8bGDNTAJy/6n8mA="; 26 }; 27 28 build-system = [ setuptools ]; 29 30 propagatedBuildInputs = [ 31 lxml 32 requests 33 ]; 34 35 # pathlib is installed part of python38+ w/o an external package 36 prePatch = '' 37 substituteInPlace setup.py --replace-fail "pathlib>=1.0" "" 38 ''; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 pytest-cov-stub 43 matplotlib 44 networkx 45 pandas 46 ]; 47 preCheck = '' 48 export PYXNAT_SKIP_NETWORK_TESTS=1 49 ''; 50 enabledTestPaths = [ "pyxnat" ]; 51 disabledTestPaths = [ 52 # require a running local XNAT instance e.g. in a docker container: 53 "pyxnat/tests/attributes_test.py" 54 "pyxnat/tests/custom_variables_test.py" 55 "pyxnat/tests/interfaces_test.py" 56 "pyxnat/tests/pipelines_test.py" 57 "pyxnat/tests/provenance_test.py" 58 "pyxnat/tests/prearchive_test.py" 59 "pyxnat/tests/repr_test.py" 60 "pyxnat/tests/resources_test.py" 61 "pyxnat/tests/search_test.py" 62 "pyxnat/tests/sessionmirror_test.py" 63 "pyxnat/tests/test_resource_functions.py" 64 "pyxnat/tests/user_and_project_management_test.py" 65 ]; 66 disabledTests = [ 67 # try to access network even though PYXNAT_SKIP_NETWORK_TESTS is set: 68 "test_inspector_structure" 69 "test_project_manager" 70 ]; 71 72 pythonImportsCheck = [ "pyxnat" ]; 73 74 meta = { 75 homepage = "https://pyxnat.github.io/pyxnat"; 76 description = "Python API to XNAT"; 77 mainProgram = "sessionmirror.py"; 78 changelog = "https://github.com/pyxnat/pyxnat/releases/tag/${src.tag}"; 79 license = lib.licenses.bsd3; 80 maintainers = with lib.maintainers; [ bcdarwin ]; 81 }; 82}