1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 numpy,
9 poetry-core,
10 pygments,
11 pysmb,
12 pytest-aiohttp,
13 pytest-asyncio,
14 pytestCheckHook,
15 pythonOlder,
16}:
17
18buildPythonPackage rec {
19 pname = "pyairvisual";
20 version = "2023.12.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.10";
24
25 src = fetchFromGitHub {
26 owner = "bachya";
27 repo = "pyairvisual";
28 tag = version;
29 hash = "sha256-uN31LeHYmg4V6Ln3EQp765nOsN5v56TxjYSS/g6TUCY=";
30 };
31
32 nativeBuildInputs = [ poetry-core ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 certifi
37 numpy
38 pygments
39 pysmb
40 ];
41
42 # this lets tests bind to localhost in sandbox mode on macOS
43 __darwinAllowLocalNetworking = true;
44
45 nativeCheckInputs = [
46 aresponses
47 pytest-aiohttp
48 pytest-asyncio
49 pytestCheckHook
50 pytestCheckHook
51 ];
52
53 disabledTestPaths = [
54 # Ignore the examples directory as the files are prefixed with test_.
55 "examples/"
56 ];
57
58 pythonImportsCheck = [ "pyairvisual" ];
59
60 meta = with lib; {
61 description = "Python library for interacting with AirVisual";
62 homepage = "https://github.com/bachya/pyairvisual";
63 changelog = "https://github.com/bachya/pyairvisual/releases/tag/${version}";
64 license = with licenses; [ mit ];
65 maintainers = with maintainers; [ fab ];
66 };
67}