1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytest-asyncio,
7 pytestCheckHook,
8 stdenv,
9 syrupy,
10}:
11
12buildPythonPackage rec {
13 pname = "pyheos";
14 version = "1.0.5";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "andrewsayre";
19 repo = "pyheos";
20 tag = version;
21 hash = "sha256-waOeUAvQtx8klFVGnMHi6/OI2s6fxgVjB8aBlaKtklQ=";
22 };
23
24 build-system = [ setuptools ];
25
26 nativeCheckInputs = [
27 pytest-asyncio
28 pytestCheckHook
29 syrupy
30 ];
31
32 disabledTests =
33 [
34 # accesses network
35 "test_connect_timeout"
36 ]
37 ++ lib.optionals stdenv.hostPlatform.isDarwin [
38 # OSError: could not bind on any address out of [('127.0.0.2', 1255)]
39 "test_failover"
40 ];
41
42 __darwinAllowLocalNetworking = true;
43
44 pythonImportsCheck = [ "pyheos" ];
45
46 meta = {
47 changelog = "https://github.com/andrewsayre/pyheos/releases/tag/${src.tag}";
48 description = "Async python library for controlling HEOS devices through the HEOS CLI Protocol";
49 homepage = "https://github.com/andrewsayre/pyheos";
50 license = lib.licenses.asl20;
51 maintainers = with lib.maintainers; [ dotlambda ];
52 };
53}