Unverified Commit d3201462 authored by natsukium's avatar natsukium
Browse files

python311Packages.openant: enable tests

and add optional-dependencies
parent eec6c0ef
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools
, pyusb
, influxdb-client
, pyserial
, pytestCheckHook
}:

buildPythonPackage rec {
@@ -10,6 +14,8 @@ buildPythonPackage rec {
  version = "1.2.1";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "Tigge";
    repo = "openant";
@@ -28,11 +34,27 @@ buildPythonPackage rec {

  propagatedBuildInputs = [ pyusb ];

  passthru.optional-dependencies = {
    serial = [
      pyserial
    ];
    influx = [
      influxdb-client
    ];
  };

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "openant"
  ];

  meta = with lib; {
    homepage = "https://github.com/Tigge/openant";
    description = "ANT and ANT-FS Python Library";
    license = licenses.mit;
    platforms = platforms.unix;
  };

}