1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flit-core, 6 pydicom, 7 pyfakefs, 8 pytestCheckHook, 9 pythonAtLeast, 10 pythonOlder, 11 sqlalchemy, 12}: 13 14buildPythonPackage rec { 15 pname = "pynetdicom"; 16 version = "2.1.1-unstable-2024-12-22"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.10"; 20 21 src = fetchFromGitHub { 22 owner = "pydicom"; 23 repo = "pynetdicom"; 24 rev = "c22be4b79a20eea0f176340629b37c6e30dd10b2"; 25 hash = "sha256-ydNFlSR/h9xJcJxHyRLpLfkaQwJABPt9PJMkPEWzf3s="; 26 }; 27 28 build-system = [ flit-core ]; 29 30 dependencies = [ pydicom ]; 31 32 nativeCheckInputs = [ 33 pyfakefs 34 pytestCheckHook 35 sqlalchemy 36 ]; 37 38 disabledTests = [ 39 # Some tests needs network capabilities 40 "test_str_types_empty" 41 "test_associate_reject" 42 "TestAEGoodAssociation" 43 "TestEchoSCP" 44 "TestEchoSCPCLI" 45 "TestEventHandlingAcceptor" 46 "TestEventHandlingRequestor" 47 "TestFindSCP" 48 "TestFindSCPCLI" 49 "TestGetSCP" 50 "TestGetSCPCLI" 51 "TestMoveSCP" 52 "TestMoveSCPCLI" 53 "TestPrimitive_N_GET" 54 "TestQRGetServiceClass" 55 "TestQRMoveServiceClass" 56 "TestSearch" 57 "TestState" 58 "TestStorageServiceClass" 59 "TestStoreSCP" 60 "TestStoreSCPCLI" 61 "TestStoreSCU" 62 "TestStoreSCUCLI" 63 ]; 64 65 disabledTestPaths = 66 [ 67 # Ignore apps tests 68 "pynetdicom/apps/tests/" 69 ] 70 ++ lib.optionals (pythonAtLeast "3.12") [ 71 # https://github.com/pydicom/pynetdicom/issues/924 72 "pynetdicom/tests/test_assoc.py" 73 "pynetdicom/tests/test_transport.py" 74 ]; 75 76 pythonImportsCheck = [ "pynetdicom" ]; 77 78 pytestFlagsArray = [ 79 # https://github.com/pydicom/pynetdicom/issues/923 80 "-W" 81 "ignore::pytest.PytestRemovedIn9Warning" 82 ]; 83 84 meta = with lib; { 85 description = "Python implementation of the DICOM networking protocol"; 86 homepage = "https://github.com/pydicom/pynetdicom"; 87 changelog = "https://github.com/pydicom/pynetdicom/releases/tag/v${version}"; 88 license = with licenses; [ mit ]; 89 maintainers = with maintainers; [ fab ]; 90 }; 91}