python312Packages.powerapi: init at 2.9.1

Python framework for building software-defined power meters

https://github.com/powerapi-ng/powerapi
This commit is contained in:
Fabian Affolter 2024-11-30 15:34:23 +01:00
parent 9ef587a977
commit 399109c44d
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,64 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
influxdb-client,
kubernetes,
mock,
prometheus-client,
pymongo,
pytest-cov-stub,
pytest-timeout,
pytestCheckHook,
pythonOlder,
pyzmq,
setproctitle,
setuptools,
}:
buildPythonPackage rec {
pname = "powerapi";
version = "2.9.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "powerapi-ng";
repo = "powerapi";
rev = "refs/tags/v${version}";
hash = "sha256-iFWCrO9frMK68kefmKQrXra1g5efDCj2ZOlVwxDNvXw=";
};
build-system = [ setuptools ];
dependencies = [
pyzmq
setproctitle
];
optional-dependencies = {
influxdb = [ influxdb-client ];
kubernetes = [ kubernetes ];
mongodb = [ pymongo ];
# opentsdb = [ opentsdb-py ];
prometheus = [ prometheus-client ];
};
nativeCheckInputs = [
mock
pytest-cov-stub
pytestCheckHook
pytest-timeout
] ++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "powerapi" ];
meta = {
description = "Python framework for building software-defined power meters";
homepage = "https://github.com/powerapi-ng/powerapi";
changelog = "https://github.com/powerapi-ng/powerapi/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@ -10829,6 +10829,8 @@ self: super: with self; {
power = callPackage ../development/python-modules/power { };
powerapi = callPackage ../development/python-modules/powerapi { };
powerline = callPackage ../development/python-modules/powerline { };
powerline-mem-segment = callPackage ../development/python-modules/powerline-mem-segment { };