python311Packages.openant: enable tests

and add optional-dependencies
This commit is contained in:
natsukium 2023-10-17 15:45:24 +09:00
parent eec6c0ef26
commit d3201462f9
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53

View File

@ -1,8 +1,12 @@
{ 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;
};
}