1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 dnspython,
6 fetchFromGitHub,
7 pytest-asyncio_0,
8 pytestCheckHook,
9 pythonAtLeast,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "pykaleidescape";
16 version = "2022.2.3";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "SteveEasley";
23 repo = "pykaleidescape";
24 tag = "v${version}";
25 hash = "sha256-h5G7wV4Z+sf8Qq4GNFsp8DVDSgQgS0dLGf+DzK/egYM=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 aiohttp
32 dnspython
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio_0
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "kaleidescape" ];
41
42 disabledTests = [
43 # Test requires network access
44 "test_resolve_succeeds"
45 ]
46 ++ lib.optionals (pythonAtLeast "3.12") [
47 # stuck in EpollSelector.poll()
48 "test_manual_disconnect"
49 "test_concurrency"
50 ];
51
52 meta = with lib; {
53 description = "Module for controlling Kaleidescape devices";
54 homepage = "https://github.com/SteveEasley/pykaleidescape";
55 changelog = "https://github.com/SteveEasley/pykaleidescape/releases/tag/${src.tag}";
56 license = licenses.mit;
57 maintainers = with maintainers; [ fab ];
58 };
59}