2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
poetry-core,
|
2024-04-21 15:54:59 +00:00
|
|
|
pydicom,
|
|
|
|
pyfakefs,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
sqlalchemy,
|
2021-03-15 08:37:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pynetdicom";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.1.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-15 08:37:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pydicom";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "pynetdicom";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-gAgNSvNn5VsctqhbT/CzFVhwCEpZwGb1pOh0JwkuAW8=";
|
2021-03-15 08:37:03 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
dependencies = [ pydicom ];
|
2021-03-15 08:37:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-15 08:37:03 +00:00
|
|
|
pyfakefs
|
|
|
|
pytestCheckHook
|
|
|
|
sqlalchemy
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Some tests needs network capabilities
|
|
|
|
"test_str_types_empty"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_associate_reject"
|
2021-12-30 13:39:12 +00:00
|
|
|
"TestAEGoodAssociation"
|
2021-03-15 08:37:03 +00:00
|
|
|
"TestEchoSCP"
|
|
|
|
"TestEchoSCPCLI"
|
2022-04-27 09:35:20 +00:00
|
|
|
"TestEventHandlingAcceptor"
|
2022-05-18 14:49:53 +00:00
|
|
|
"TestEventHandlingRequestor"
|
2021-04-05 15:23:46 +00:00
|
|
|
"TestFindSCP"
|
|
|
|
"TestFindSCPCLI"
|
|
|
|
"TestGetSCP"
|
|
|
|
"TestGetSCPCLI"
|
|
|
|
"TestMoveSCP"
|
|
|
|
"TestMoveSCPCLI"
|
2022-04-27 09:35:20 +00:00
|
|
|
"TestPrimitive_N_GET"
|
2021-04-05 15:23:46 +00:00
|
|
|
"TestQRGetServiceClass"
|
|
|
|
"TestQRMoveServiceClass"
|
2022-04-27 09:35:20 +00:00
|
|
|
"TestSearch"
|
2022-01-13 20:06:32 +00:00
|
|
|
"TestState"
|
|
|
|
"TestStorageServiceClass"
|
2021-03-15 08:37:03 +00:00
|
|
|
"TestStoreSCP"
|
|
|
|
"TestStoreSCPCLI"
|
|
|
|
"TestStoreSCU"
|
|
|
|
"TestStoreSCUCLI"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths =
|
|
|
|
[
|
|
|
|
# Ignore apps tests
|
|
|
|
"pynetdicom/apps/tests/"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.12") [
|
|
|
|
# https://github.com/pydicom/pynetdicom/issues/924
|
|
|
|
"pynetdicom/tests/test_assoc.py"
|
|
|
|
"pynetdicom/tests/test_transport.py"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "pynetdicom" ];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
# https://github.com/pydicom/pynetdicom/issues/923
|
|
|
|
"-W"
|
2024-06-05 15:53:02 +00:00
|
|
|
"ignore::pytest.PytestRemovedIn9Warning"
|
2021-12-30 13:39:12 +00:00
|
|
|
];
|
2021-03-15 08:37:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python implementation of the DICOM networking protocol";
|
|
|
|
homepage = "https://github.com/pydicom/pynetdicom";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/pydicom/pynetdicom/releases/tag/v${version}";
|
2021-03-15 08:37:03 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2021-04-05 15:23:46 +00:00
|
|
|
# Tests are not passing on Darwin/Aarch64, thus it's assumed that it doesn't work
|
|
|
|
broken = stdenv.isDarwin || stdenv.isAarch64;
|
2021-03-15 08:37:03 +00:00
|
|
|
};
|
|
|
|
}
|