2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-10-07 14:46:35 +00:00
|
|
|
, aiohttp
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2020-10-11 12:50:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, freezegun
|
2021-10-07 14:46:35 +00:00
|
|
|
, oauthlib
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
2020-10-11 12:50:04 +00:00
|
|
|
, pytestCheckHook
|
2021-10-07 14:46:35 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests_oauthlib
|
2020-10-11 12:50:04 +00:00
|
|
|
, requests-mock
|
2021-10-07 14:46:35 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatmo";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "6.2.4";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-10-07 14:46:35 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jabesq";
|
2021-02-05 17:12:51 +00:00
|
|
|
repo = "pyatmo";
|
2020-10-11 12:50:04 +00:00
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-VXkQByaNA02fwBO2yuf7w1ZF/oJwd/h21de1EQlCu2U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-07 14:46:35 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
aiohttp
|
2020-11-06 00:33:48 +00:00
|
|
|
oauthlib
|
|
|
|
requests
|
|
|
|
requests_oauthlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
checkInputs = [
|
|
|
|
freezegun
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2020-10-11 12:50:04 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
2021-10-07 14:46:35 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "oauthlib~=3.1" "oauthlib" \
|
|
|
|
--replace "requests~=2.24" "requests"
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyatmo"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple API to access Netatmo weather station data";
|
2021-10-07 14:46:35 +00:00
|
|
|
homepage = "https://github.com/jabesq/pyatmo";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ delroth ];
|
|
|
|
};
|
|
|
|
}
|