python311Packages.openant: enable tests
and add optional-dependencies
This commit is contained in:
parent
eec6c0ef26
commit
d3201462f9
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user