From 2c1c069215b253e426b9aa1d6baa1402ab4e2931 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Aug 2024 10:26:37 +0200 Subject: [PATCH 1/4] python312Packages.pygatt: 4.0.5 -> 5.0.0 Diff: https://github.com/peplin/pygatt/compare/refs/tags/v4.0.5...v5.0.0 Changelog: https://github.com/peplin/pygatt/blob/v5.0.0/CHANGELOG.rst --- .../python-modules/pygatt/default.nix | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pygatt/default.nix b/pkgs/development/python-modules/pygatt/default.nix index bc77900c02706..f5f5f4e0831db 100644 --- a/pkgs/development/python-modules/pygatt/default.nix +++ b/pkgs/development/python-modules/pygatt/default.nix @@ -3,7 +3,6 @@ buildPythonPackage, fetchFromGitHub, mock, - nose, pexpect, pyserial, pytestCheckHook, @@ -13,40 +12,33 @@ buildPythonPackage rec { pname = "pygatt"; - version = "4.0.5"; + version = "5.0.0"; pyproject = true; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "peplin"; repo = "pygatt"; rev = "refs/tags/v${version}"; - hash = "sha256-DUZGsztZViVNZwmhXoRN5FOQ7BgUeI0SsYgCHlvsrv0="; + hash = "sha256-TMIqC+JvNOLU38a9jkacRAbdmAAd4UekFUDRoAWhHFo="; }; postPatch = '' - # Not support for Python < 3.4 substituteInPlace setup.py \ - --replace-fail "'enum-compat'" "" \ - --replace-fail "'coverage >= 3.7.1'," "" \ - --replace-fail "'nose >= 1.3.7'" "" - substituteInPlace tests/bgapi/test_bgapi.py \ - --replace-fail "assertEquals" "assertEqual" + --replace-fail "setup_requires" "test_requires" ''; + pythonRemoveDeps = [ "enum-compat" ]; + build-system = [ setuptools ]; dependencies = [ pyserial ]; optional-dependencies.GATTTOOL = [ pexpect ]; - # tests require nose - doCheck = pythonOlder "3.12"; - nativeCheckInputs = [ mock - nose pytestCheckHook ] ++ optional-dependencies.GATTTOOL; From 9ff53b879e6ecb53bafa87b66ec193a074f11250 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Aug 2024 11:39:06 +0200 Subject: [PATCH 2/4] python312Packages.modbus-tk: 1.1.1 -> 1.1.3 --- .../python-modules/modbus-tk/default.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/modbus-tk/default.nix b/pkgs/development/python-modules/modbus-tk/default.nix index 6f1b502c615bc..5d82d3aec56ca 100644 --- a/pkgs/development/python-modules/modbus-tk/default.nix +++ b/pkgs/development/python-modules/modbus-tk/default.nix @@ -1,37 +1,34 @@ { lib, buildPythonPackage, - fetchFromGitHub, + fetchPypi, setuptools, pythonOlder, pyserial, - pytestCheckHook, }: buildPythonPackage rec { pname = "modbus-tk"; - version = "1.1.1"; + version = "1.1.3"; pyproject = true; disabled = pythonOlder "3.10"; - src = fetchFromGitHub { - owner = "ljean"; - repo = "modbus-tk"; - rev = "refs/tags/${version}"; - hash = "sha256-zikfVMFdlOJvuKVQGEsK03i58X6BGFsGWGrGOJZGC0g="; + src = fetchPypi { + pname = "modbus_tk"; + inherit version; + hash = "sha256-aQ+nu4bql4mSRl0tYci1rMY5zg6LgzoKqW1N0XLFZEo="; }; build-system = [ setuptools ]; dependencies = [ pyserial ]; - nativeCheckInputs = [ pytestCheckHook ]; + # Source no tagged anymore and PyPI doesn't ship tests + doCheck = false; pythonImportsCheck = [ "modbus_tk" ]; - pytestFlagsArray = [ "tests/unittest_*.py" ]; - meta = with lib; { description = "Module for simple Modbus interactions"; homepage = "https://github.com/ljean/modbus-tk"; From 3d247dae222844e75c910509b44c0094e8e35021 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Aug 2024 16:24:35 +0200 Subject: [PATCH 3/4] python312Packages.riden: init at 1.2.1 Module for Riden RD power supplies https://github.com/geeksville/riden --- .../python-modules/riden/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/riden/default.nix diff --git a/pkgs/development/python-modules/riden/default.nix b/pkgs/development/python-modules/riden/default.nix new file mode 100644 index 0000000000000..30c89f4e68e4f --- /dev/null +++ b/pkgs/development/python-modules/riden/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildPythonPackage, + click, + fetchFromGitHub, + modbus-tk, + poetry-core, + pyserial, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "riden"; + version = "1.2.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "geeksville"; + repo = "riden"; + rev = "refs/tags/${version}"; + hash = "sha256-uR1CsVsGn/QC4krHaxl6GqRnTPbFdRaqyMEl2RVMHPU="; + }; + + build-system = [ + poetry-core + setuptools + ]; + + dependencies = [ + click + modbus-tk + pyserial + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "riden" ]; + + meta = with lib; { + description = "Module for Riden RD power supplies"; + homepage = "https://github.com/geeksville/riden"; + changelog = "https://github.com/geeksville/Riden/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ccf6fddb9f02..6ac845303457f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13682,6 +13682,8 @@ self: super: with self; { rich-theme-manager = callPackage ../development/python-modules/rich-theme-manager { }; + riden = callPackage ../development/python-modules/riden { }; + ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; rio-tiler = callPackage ../development/python-modules/rio-tiler { }; From 19594df2d214f7b33108b635fb0a303acf31b0cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Aug 2024 12:38:39 +0200 Subject: [PATCH 4/4] python312Packages.meshtastic: 2.3.11 -> 2.3.14 Changelog: https://github.com/meshtastic/python/releases/tag/2.3.14 --- .../python-modules/meshtastic/default.nix | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/meshtastic/default.nix b/pkgs/development/python-modules/meshtastic/default.nix index 4c5d9928d070e..e7ce8351b1b37 100644 --- a/pkgs/development/python-modules/meshtastic/default.nix +++ b/pkgs/development/python-modules/meshtastic/default.nix @@ -4,10 +4,16 @@ buildPythonPackage, dotmap, fetchFromGitHub, + hypothesis, packaging, + parse, pexpect, + platformdirs, + ppk2-api, + print-color, protobuf, - pygatt, + pyarrow, + pyparsing, pypubsub, pyqrcode, pyserial, @@ -19,6 +25,7 @@ setuptools, tabulate, timeago, + webencodings, }: buildPythonPackage rec { @@ -35,15 +42,22 @@ buildPythonPackage rec { hash = "sha256-s56apVx7+EXkdw3FUjyGKGFjP+IVbO0/VDB4urXEtXQ="; }; + pythonRelaxDeps = [ "protobuf" ]; + build-system = [ setuptools ]; dependencies = [ bleak dotmap packaging + parse pexpect + platformdirs + ppk2-api + print-color protobuf - pygatt + pyarrow + pyparsing pypubsub pyqrcode pyserial @@ -52,6 +66,7 @@ buildPythonPackage rec { setuptools tabulate timeago + webencodings ]; passthru.optional-dependencies = { @@ -59,9 +74,9 @@ buildPythonPackage rec { }; nativeCheckInputs = [ - pytap2 + hypothesis pytestCheckHook - ]; + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); preCheck = '' export PATH="$PATH:$out/bin"; @@ -79,6 +94,7 @@ buildPythonPackage rec { "test_main_support" "test_MeshInterface" "test_message_to_json_shows_all" + "test_node" "test_SerialInterface_single_port" "test_support_info" "test_TCPInterface"