1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 poetry-core,
9 pytest-aiohttp,
10 pytest-asyncio,
11 pytestCheckHook,
12 pythonOlder,
13 yarl,
14}:
15
16buildPythonPackage rec {
17 pname = "aiowatttime";
18 version = "2024.06.0";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.10";
22
23 src = fetchFromGitHub {
24 owner = "bachya";
25 repo = "aiowatttime";
26 tag = version;
27 hash = "sha256-c5L+Nx+CoWEc6Bs61GOHPBelExe5I7EOlMQ+QV6nktI=";
28 };
29
30 nativeBuildInputs = [ poetry-core ];
31
32 propagatedBuildInputs = [
33 aiohttp
34 certifi
35 yarl
36 ];
37
38 __darwinAllowLocalNetworking = true;
39
40 nativeCheckInputs = [
41 aresponses
42 pytest-aiohttp
43 pytest-asyncio
44 pytestCheckHook
45 ];
46
47 # Ignore the examples directory as the files are prefixed with test_
48 disabledTestPaths = [ "examples/" ];
49
50 pythonImportsCheck = [ "aiowatttime" ];
51
52 meta = with lib; {
53 description = "Python library for interacting with WattTime";
54 homepage = "https://github.com/bachya/aiowatttime";
55 license = with licenses; [ mit ];
56 maintainers = with maintainers; [ fab ];
57 };
58}