Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pynetdicom / default.nix
blob6f0407aacdff3b2f609c8d8a645c1594e709a11f
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   fetchpatch,
7   pydicom,
8   pyfakefs,
9   pytestCheckHook,
10   pythonAtLeast,
11   pythonOlder,
12   setuptools,
13   sqlalchemy,
16 buildPythonPackage rec {
17   pname = "pynetdicom";
18   version = "2.0.2";
19   pyproject = true;
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "pydicom";
25     repo = "pynetdicom";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-/JWQUtFBW4uqCbs/nUxj1pRBfTCXV4wcqTkqvzpdFrM=";
28   };
30   patches = [
31     (fetchpatch {
32       name = "fix-python-3.11-test-attribute-errors";
33       url = "https://github.com/pydicom/pynetdicom/pull/754/commits/2126bd932d6dfb3f07045eb9400acb7eaa1b3069.patch";
34       hash = "sha256-t6Lg0sTZSWIE5q5pkBvEoHDQ+cklDn8SgNBcFk1myp4=";
35     })
36   ];
38   build-system = [ setuptools ];
40   dependencies = [ pydicom ];
42   nativeCheckInputs = [
43     pyfakefs
44     pytestCheckHook
45     sqlalchemy
46   ];
48   disabledTests = [
49     # Some tests needs network capabilities
50     "test_str_types_empty"
51     "test_associate_reject"
52     "TestAEGoodAssociation"
53     "TestEchoSCP"
54     "TestEchoSCPCLI"
55     "TestEventHandlingAcceptor"
56     "TestEventHandlingRequestor"
57     "TestFindSCP"
58     "TestFindSCPCLI"
59     "TestGetSCP"
60     "TestGetSCPCLI"
61     "TestMoveSCP"
62     "TestMoveSCPCLI"
63     "TestPrimitive_N_GET"
64     "TestQRGetServiceClass"
65     "TestQRMoveServiceClass"
66     "TestSearch"
67     "TestState"
68     "TestStorageServiceClass"
69     "TestStoreSCP"
70     "TestStoreSCPCLI"
71     "TestStoreSCU"
72     "TestStoreSCUCLI"
73   ];
75   disabledTestPaths = [
76     # Ignore apps tests
77     "pynetdicom/apps/tests/"
78   ] ++ lib.optionals (pythonAtLeast "3.12") [
79     # https://github.com/pydicom/pynetdicom/issues/924
80     "pynetdicom/tests/test_assoc.py"
81     "pynetdicom/tests/test_transport.py"
82   ];
84   pythonImportsCheck = [ "pynetdicom" ];
86   pytestFlagsArray = [
87     # https://github.com/pydicom/pynetdicom/issues/923
88     "-W"
89     "ignore::pytest.PytestRemovedIn8Warning"
90   ];
92   meta = with lib; {
93     description = "Python implementation of the DICOM networking protocol";
94     homepage = "https://github.com/pydicom/pynetdicom";
95     changelog = "https://github.com/pydicom/pynetdicom/releases/tag/v${version}";
96     license = with licenses; [ mit ];
97     maintainers = with maintainers; [ fab ];
98     # Tests are not passing on Darwin/Aarch64, thus it's assumed that it doesn't work
99     broken = stdenv.isDarwin || stdenv.isAarch64;
100   };