2021-09-26 12:46:18 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
2021-12-19 01:06:50 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-26 12:46:18 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiopvapi";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "2.0.1";
|
2021-09-26 12:46:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sander76";
|
|
|
|
repo = "aio-powerview-api";
|
|
|
|
# no tags on git, no sdist on pypi: https://github.com/sander76/aio-powerview-api/issues/12
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-QXWne6rTL1RjHemJJEuWX6HB2F5VSe7NJtnCpaew/xI=";
|
2021-09-26 12:46:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# async_timeout 4.0.0 removes loop, https://github.com/sander76/aio-powerview-api/pull/13
|
|
|
|
# Patch doesn't apply due to different line endings
|
|
|
|
substituteInPlace aiopvapi/helpers/aiorequest.py \
|
|
|
|
--replace ", loop=self.loop)" ")"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiopvapi"
|
|
|
|
];
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for the PowerView API";
|
|
|
|
homepage = "https://github.com/sander76/aio-powerview-api";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|