python3Packages.glances-api: 0.2.1 -> 0.3.2

This commit is contained in:
Fabian Affolter 2021-11-24 08:43:43 +01:00
parent 1799f8e87b
commit 5565961762

View File

@ -1,29 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, aiohttp
, async-timeout
, httpx
, poetry-core
, pytest-asyncio
, pytest-httpx
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "glances-api";
version = "0.2.1";
version = "0.3.2";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "home-assistant-ecosystem";
repo = "python-glances-api";
rev = version;
sha256 = "sha256-mbkZZg2fmus4kOXFxHE/UV/nxemFAsoEZu8IUa7SPsg=";
sha256 = "sha256-zVK63SI8ZeVrY2iEEkgp8pq6RDheKeApb9/RWgZCKGI=";
};
propagatedBuildInputs = [
aiohttp
async-timeout
nativeBuildInputs = [
poetry-core
];
# no tests are present
doCheck = false;
pythonImportsCheck = [ "glances_api" ];
propagatedBuildInputs = [
httpx
];
checkInputs = [
pytest-asyncio
pytest-httpx
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'httpx = ">=0.20,<1"' 'httpx = ">=0.19,<1"'
'';
pythonImportsCheck = [
"glances_api"
];
meta = with lib; {
description = "Python API for interacting with Glances";