From 4e6d3feb566667b6d8df6ab5bfbf7ca91da19dbb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 28 Mar 2023 09:19:11 +0200 Subject: [PATCH 1/2] python310Packages.asyncua: add changelog to meta --- pkgs/development/python-modules/asyncua/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/asyncua/default.nix b/pkgs/development/python-modules/asyncua/default.nix index 8faa98cfda06..028b60e7adb3 100644 --- a/pkgs/development/python-modules/asyncua/default.nix +++ b/pkgs/development/python-modules/asyncua/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "FreeOpcUa"; repo = "opcua-asyncio"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-6A4z+tiQ2oUlB9t44wlW64j5sjWFMAgqT3Xt0FdJCBs="; }; @@ -60,6 +60,7 @@ buildPythonPackage rec { meta = with lib; { 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/v${version}"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ harvidsen ]; }; From 025027cb010bdeeb0ca070d222857a5a8abc3d82 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 28 Mar 2023 09:31:32 +0200 Subject: [PATCH 2/2] python310Packages.asyncua: remove asynctest --- .../python-modules/asyncua/default.nix | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/asyncua/default.nix b/pkgs/development/python-modules/asyncua/default.nix index 028b60e7adb3..90c4a2bfc9af 100644 --- a/pkgs/development/python-modules/asyncua/default.nix +++ b/pkgs/development/python-modules/asyncua/default.nix @@ -1,19 +1,17 @@ { lib -, buildPythonPackage -, fetchFromGitHub -, aiosqlite , aiofiles -, pytz -, python-dateutil -, sortedcontainers +, aiosqlite +, buildPythonPackage , cryptography -, typing-extensions -, importlib-metadata -, pytestCheckHook +, fetchFromGitHub , pytest-asyncio , pytest-mock -, asynctest +, pytestCheckHook +, python-dateutil , pythonOlder +, pytz +, sortedcontainers +, typing-extensions }: buildPythonPackage rec { @@ -21,7 +19,7 @@ buildPythonPackage rec { version = "1.0.1"; format = "setuptools"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "FreeOpcUa"; @@ -30,6 +28,12 @@ buildPythonPackage rec { hash = "sha256-6A4z+tiQ2oUlB9t44wlW64j5sjWFMAgqT3Xt0FdJCBs="; }; + postPatch = '' + # https://github.com/FreeOpcUa/opcua-asyncio/issues/1263 + substituteInPlace setup.py \ + --replace ", 'asynctest'" "" + ''; + propagatedBuildInputs = [ aiosqlite aiofiles @@ -38,23 +42,21 @@ buildPythonPackage rec { sortedcontainers cryptography typing-extensions - ] ++ lib.optionals (pythonOlder "3.8") [ - importlib-metadata - ]; - - pythonImportsCheck = [ - "asyncua" ]; nativeCheckInputs = [ pytestCheckHook pytest-asyncio pytest-mock - asynctest + ]; + + pythonImportsCheck = [ + "asyncua" ]; disabledTests = [ - "test_cli_tools_which_require_sigint" # Hard coded path only works from root of src + # Hard coded path only works from root of src + "test_cli_tools_which_require_sigint" ]; meta = with lib; {