about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-03-29 00:03:28 +0100
committerGitHub <noreply@github.com>2024-03-29 00:03:28 +0100
commit8c1931aaba2c79d644e7e14d0d9a66c9b6f93762 (patch)
tree555f2bda064800b01866d4bb93e132b225f57cc9
parentfea7560cbd25986eebcec8990fd1f3d346933d87 (diff)
parent10865ad4c1d38f5ff02bf60c747842c0904b52ed (diff)
downloadnixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.tar
nixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.tar.gz
nixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.tar.bz2
nixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.tar.lz
nixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.tar.xz
nixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.tar.zst
nixlib-8c1931aaba2c79d644e7e14d0d9a66c9b6f93762.zip
Merge pull request #299836 from fabaff/pyinsteon-fix
python312Packages.pyinsteon: disable all handlers tests on Python 3.12
-rw-r--r--pkgs/development/python-modules/pyinsteon/default.nix33
1 files changed, 11 insertions, 22 deletions
diff --git a/pkgs/development/python-modules/pyinsteon/default.nix b/pkgs/development/python-modules/pyinsteon/default.nix
index e2e25aa18dcd..22242ee62bf4 100644
--- a/pkgs/development/python-modules/pyinsteon/default.nix
+++ b/pkgs/development/python-modules/pyinsteon/default.nix
@@ -1,6 +1,7 @@
 { lib
 , aiofiles
 , aiohttp
+, async-timeout
 , async-generator
 , buildPythonPackage
 , fetchFromGitHub
@@ -12,31 +13,30 @@
 , pythonOlder
 , setuptools
 , voluptuous
-, wheel
 }:
 
 buildPythonPackage rec {
   pname = "pyinsteon";
   version = "1.5.3";
-  format = "pyproject";
+  pyproject = true;
 
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
-    owner = pname;
-    repo = pname;
+    owner = "pyinsteon";
+    repo = "pyinsteon";
     rev = "refs/tags/${version}";
     hash = "sha256-9d6QbekUv63sjKdK+ZogYOkGfFXVW+JB6ITHnehLwtM=";
   };
 
-  nativeBuildInputs = [
+  build-system = [
     setuptools
-    wheel
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     aiofiles
     aiohttp
+    async-timeout
     pypubsub
     pyserial
     pyserial-asyncio
@@ -48,20 +48,9 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  disabledTests = lib.optionals (pythonAtLeast "3.12") [
-    # AssertionError: Failed test 'read_eeprom_response' with argument 'group' value X vs expected value Z
-    "test_async_send"
-    "test_nak_response"
-    "test_no_direct_ack"
-    "test_on_level"
-    "test_on_level_group"
-    "test_on_level_nak"
-    # AssertionError: Failed test 'read_eeprom_response' with argument 'target' value X vs expected value Y
-    "test_other_status"
-    "test_status_command"
-    "test_status_request_hub"
-    # stuck in epoll
-    "test_read_all_peek"
+  disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [
+    # Tests are blocking or failing
+    "tests/test_handlers/"
   ];
 
   pythonImportsCheck = [
@@ -70,7 +59,6 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Python library to support Insteon home automation projects";
-    mainProgram = "insteon_tools";
     longDescription = ''
       This is a Python package to interface with an Insteon Modem. It has been
       tested to work with most USB or RS-232 serial based devices such as the
@@ -80,5 +68,6 @@ buildPythonPackage rec {
     changelog = "https://github.com/pyinsteon/pyinsteon/releases/tag/${version}";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ fab ];
+    mainProgram = "insteon_tools";
   };
 }