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
|
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
|
2022-04-27 09:35:20 +00:00
|
|
|
, requests-oauthlib
|
2020-10-11 12:50:04 +00:00
|
|
|
, requests-mock
|
2021-10-07 14:46:35 +00:00
|
|
|
, setuptools-scm
|
2022-08-12 12:06:08 +00:00
|
|
|
, time-machine
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatmo";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "7.5.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-GucatimZTg0Fggrz4bG1x6YSa3wE/uLGB4ufil/km3w=";
|
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
|
2022-04-27 09:35:20 +00:00
|
|
|
requests-oauthlib
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2020-10-11 12:50:04 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2022-08-12 12:06:08 +00:00
|
|
|
time-machine
|
2020-10-11 12:50:04 +00:00
|
|
|
];
|
|
|
|
|
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";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/jabesq/pyatmo/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ delroth ];
|
|
|
|
};
|
|
|
|
}
|