Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109{ lib, stdenv, aiofiles, aiosqlite, anyio, buildPythonPackage, cryptography, fetchFromGitHub, hatchling, pyopenssl, pytest-asyncio, pytest-mock, pytestCheckHook, python-dateutil, pythonAtLeast, pytz, sortedcontainers, typing-extensions,}:
buildPythonPackage (finalAttrs: { pname = "asyncua"; version = "2.1.0"; pyproject = true;
src = fetchFromGitHub { owner = "FreeOpcUa"; repo = "opcua-asyncio"; tag = "v${finalAttrs.version}"; hash = "sha256-8IyTMKk+cPZZI0m/PW5CvxMSgngmMeQkznT7IlN6Qxs="; fetchSubmodules = true; };
postPatch = '' # Workaround hardcoded paths in test # "test_cli_tools_which_require_sigint" substituteInPlace tests/test_tools.py \ --replace-fail "tools/" "$out/bin/" '';
build-system = [ hatchling ];
dependencies = [ aiofiles aiosqlite anyio cryptography pyopenssl python-dateutil pytz sortedcontainers typing-extensions ];
nativeCheckInputs = [ pytestCheckHook pytest-asyncio pytest-mock ];
pythonImportsCheck = [ "asyncua" ];
# PermissionError: [Errno 1] Operation not permitted __darwinAllowLocalNetworking = true;
disabledTests = [ # Failed: DID NOT RAISE <class 'asyncio.exceptions.TimeoutError'> "test_publish" # KeyError: 'Simple' "test_full_simple" ] ++ lib.optionals (pythonAtLeast "3.13") [ # dbm.sqlite3.error: SQLite objects created in a thread can only be used in that same thread. # The object was created in thread id 140737220687552 and this is thread id 140737343690560. "test_runTest" # error while attempting to bind on address "test_failover_warm" "test_client_admin" "test_client_user" "test_client_anonymous" "test_x509identity_user" "test_x509identity_anonymous" "test_client_user_x509identity_admin" ];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_callback_service.py" "tests/test_client_cert_chain.py" "tests/test_crypto_connect.py" "tests/test_crypto_connect.py" "tests/test_gen_certificates.py" "tests/test_password.py" "tests/test_permissions.py" "tests/test_pubsub.py" "tests/test_sync.py" "tests/test_truststore.py" "tests/test_subscriptions.py" ];
meta = { description = "OPC UA / IEC 62541 Client and Server for Python"; homepage = "https://github.com/FreeOpcUa/opcua-asyncio"; changelog = "https://github.com/FreeOpcUa/opcua-asyncio/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.lgpl3Plus; maintainers = with lib.maintainers; [ harvidsen ]; };})