Unverified Commit 0c07957a authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #332660 from fabaff/pygatt-bump

python312Packages.pygatt: 4.0.5 -> 5.0.0, python312Packages.meshtastic: 2.3.11 -> 2.3.14 
parents 2de65f4a 19594df2
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -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"
+8 −11
Original line number Diff line number Diff line
{
  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";
+6 −14
Original line number Diff line number Diff line
@@ -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;

+50 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -13684,6 +13684,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 { };