2019-05-04 21:43:49 +00:00
|
|
|
{ lib
|
2021-09-26 10:29:48 +00:00
|
|
|
, aiohttp
|
2019-05-04 21:43:49 +00:00
|
|
|
, buildPythonPackage
|
2020-10-09 15:32:34 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, freezegun
|
2021-09-26 10:29:48 +00:00
|
|
|
, oauthlib
|
2021-06-02 23:45:39 +00:00
|
|
|
, pytest-asyncio
|
2021-06-19 17:30:18 +00:00
|
|
|
, pytest-mock
|
2020-10-09 15:32:34 +00:00
|
|
|
, pytestCheckHook
|
2021-09-26 10:29:48 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests_oauthlib
|
2020-10-09 15:32:34 +00:00
|
|
|
, requests-mock
|
2021-09-26 10:29:48 +00:00
|
|
|
, setuptools-scm
|
2019-05-04 21:43:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatmo";
|
2022-02-01 15:52:41 +00:00
|
|
|
version = "6.2.4";
|
2021-11-19 22:14:29 +00:00
|
|
|
format = "setuptools";
|
2021-09-26 10:29:48 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2019-05-04 21:43:49 +00:00
|
|
|
|
2020-10-09 15:32:34 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jabesq";
|
2021-01-24 01:50:04 +00:00
|
|
|
repo = "pyatmo";
|
2020-10-09 15:32:34 +00:00
|
|
|
rev = "v${version}";
|
2022-02-01 15:52:41 +00:00
|
|
|
sha256 = "sha256-VXkQByaNA02fwBO2yuf7w1ZF/oJwd/h21de1EQlCu2U=";
|
2019-05-04 21:43:49 +00:00
|
|
|
};
|
|
|
|
|
2021-09-26 10:29:48 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-11-04 11:48:49 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-06-02 23:45:39 +00:00
|
|
|
aiohttp
|
2020-11-04 11:48:49 +00:00
|
|
|
oauthlib
|
|
|
|
requests
|
|
|
|
requests_oauthlib
|
|
|
|
];
|
2019-11-04 04:26:06 +00:00
|
|
|
|
2020-10-09 15:32:34 +00:00
|
|
|
checkInputs = [
|
|
|
|
freezegun
|
2021-06-02 23:45:39 +00:00
|
|
|
pytest-asyncio
|
2021-06-19 17:30:18 +00:00
|
|
|
pytest-mock
|
2020-10-09 15:32:34 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
2021-09-26 10:29:48 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "oauthlib~=3.1" "oauthlib" \
|
|
|
|
--replace "requests~=2.24" "requests"
|
|
|
|
'';
|
|
|
|
|
2021-11-19 22:14:29 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyatmo"
|
|
|
|
];
|
2019-05-04 21:43:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple API to access Netatmo weather station data";
|
2021-09-26 10:29:48 +00:00
|
|
|
homepage = "https://github.com/jabesq/pyatmo";
|
2019-05-04 21:43:49 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ delroth ];
|
|
|
|
};
|
|
|
|
}
|