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