1{
2 lib,
3 aiohttp,
4 anyio,
5 buildPythonPackage,
6 fetchFromGitHub,
7 oauthlib,
8 pytest-asyncio,
9 pytest-mock,
10 pytestCheckHook,
11 pythonOlder,
12 requests,
13 requests-oauthlib,
14 requests-mock,
15 setuptools-scm,
16 time-machine,
17}:
18
19buildPythonPackage rec {
20 pname = "pyatmo";
21 version = "9.2.3";
22 pyproject = true;
23
24 disabled = pythonOlder "3.11";
25
26 src = fetchFromGitHub {
27 owner = "jabesq";
28 repo = "pyatmo";
29 tag = "v${version}";
30 hash = "sha256-czHn5pgiyQwn+78NQnJDo49knstL9m2Gp3neZeb75js=";
31 };
32
33 pythonRelaxDeps = [
34 "oauthlib"
35 "requests-oauthlib"
36 "requests"
37 ];
38
39 build-system = [ setuptools-scm ];
40
41 dependencies = [
42 aiohttp
43 oauthlib
44 requests
45 requests-oauthlib
46 ];
47
48 nativeCheckInputs = [
49 anyio
50 pytest-asyncio
51 pytest-mock
52 pytestCheckHook
53 requests-mock
54 time-machine
55 ];
56
57 pythonImportsCheck = [ "pyatmo" ];
58
59 meta = with lib; {
60 description = "Simple API to access Netatmo weather station data";
61 homepage = "https://github.com/jabesq/pyatmo";
62 changelog = "https://github.com/jabesq/pyatmo/blob/${src.tag}/CHANGELOG.md";
63 license = licenses.mit;
64 maintainers = [ ];
65 };
66}