evcc: 0.131.8 -> 0.131.10 (#364658)
[NixPkgs.git] / pkgs / development / python-modules / asyncua / default.nix
blob6a9b6d278049fd94d84e022cd790015ed6ac315d
2   lib,
3   stdenv,
4   aiofiles,
5   aiosqlite,
6   buildPythonPackage,
7   cryptography,
8   fetchFromGitHub,
9   pyopenssl,
10   pytest-asyncio_0_21,
11   pytest-mock,
12   pytestCheckHook,
13   python-dateutil,
14   pythonOlder,
15   pytz,
16   setuptools,
17   sortedcontainers,
18   typing-extensions,
21 buildPythonPackage rec {
22   pname = "asyncua";
23   version = "1.1.5";
24   pyproject = true;
26   disabled = pythonOlder "3.8";
28   src = fetchFromGitHub {
29     owner = "FreeOpcUa";
30     repo = "opcua-asyncio";
31     rev = "refs/tags/v${version}";
32     hash = "sha256-XXjzYDOEBdA4uk0VCzscHrPCY2Lgin0JBAVDdxmSOio=";
33     fetchSubmodules = true;
34   };
36   postPatch = ''
37     # Workaround hardcoded paths in test
38     # "test_cli_tools_which_require_sigint"
39     substituteInPlace tests/test_tools.py \
40       --replace-fail "tools/" "$out/bin/"
41   '';
43   build-system = [ setuptools ];
45   dependencies = [
46     aiofiles
47     aiosqlite
48     cryptography
49     pyopenssl
50     python-dateutil
51     pytz
52     sortedcontainers
53     typing-extensions
54   ];
56   nativeCheckInputs = [
57     pytestCheckHook
58     pytest-asyncio_0_21
59     pytest-mock
60   ];
62   pythonImportsCheck = [ "asyncua" ];
64   disabledTests =
65     [
66       # Failed: DID NOT RAISE <class 'asyncio.exceptions.TimeoutError'>
67       "test_publish"
68     ]
69     ++ lib.optionals stdenv.hostPlatform.isDarwin [
70       # OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1',...
71       "test_anonymous_rejection"
72       "test_certificate_handling_success"
73       "test_encrypted_private_key_handling_success"
74       "test_encrypted_private_key_handling_success_with_cert_props"
75       "test_encrypted_private_key_handling_failure"
76     ];
78   meta = with lib; {
79     description = "OPC UA / IEC 62541 Client and Server for Python";
80     homepage = "https://github.com/FreeOpcUa/opcua-asyncio";
81     changelog = "https://github.com/FreeOpcUa/opcua-asyncio/releases/tag/v${version}";
82     license = licenses.lgpl3Plus;
83     maintainers = with maintainers; [ harvidsen ];
84   };