Unverified Commit 52b60bbd authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

python3Packages.python-dali: init at 0.11 (#431120)

parents 9e8350dc f715d610
Loading
Loading
Loading
Loading
+58 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  fetchpatch,
  buildPythonPackage,
  setuptools,
  pyusb,
  pymodbus,
  pyserial-asyncio,
  pytestCheckHook,
  pytest-asyncio,
}:

buildPythonPackage rec {
  pname = "python-dali";
  version = "0.11";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "sde1000";
    repo = "python-dali";
    tag = "v${version}";
    hash = "sha256-F/D0wyMVCUaL2SCdPKvnGS22tSgDnvUh6rs2ToKON2c=";
  };

  patches = [
    # pymodbus 3.x support
    (fetchpatch {
      url = "https://github.com/sde1000/python-dali/commit/fe85b8fd9a746d16a03de8fd8c643ef4254d1ccd.patch";
      hash = "sha256-bcfr948g7M6m3AQVArcYw9a22jA5eMim+J58iKci55s=";
    })
  ];

  build-system = [ setuptools ];

  optional-dependencies = {
    driver-unipi = [
      pyusb
      pymodbus
    ];
    driver-serial = [ pyserial-asyncio ];
  };

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ]
  ++ lib.flatten (lib.attrValues optional-dependencies);

  pythonImportsCheck = [ "dali" ];

  meta = {
    description = "IEC 62386 (DALI) lighting control library";
    homepage = "https://github.com/sde1000/python-dali";
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ sikmir ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -14483,6 +14483,8 @@ self: super: with self; {
  python-daemon = callPackage ../development/python-modules/python-daemon { };
  python-dali = callPackage ../development/python-modules/python-dali { };
  python-datemath = callPackage ../development/python-modules/python-datemath { };
  python-dateutil = callPackage ../development/python-modules/python-dateutil { };