1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 dnspython,
6 fetchFromGitHub,
7 pytest-asyncio,
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
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "kaleidescape" ];
41
42 disabledTests =
43 [
44 # Test requires network access
45 "test_resolve_succeeds"
46 ]
47 ++ lib.optionals (pythonAtLeast "3.12") [
48 # stuck in EpollSelector.poll()
49 "test_manual_disconnect"
50 "test_concurrency"
51 ];
52
53 meta = with lib; {
54 description = "Module for controlling Kaleidescape devices";
55 homepage = "https://github.com/SteveEasley/pykaleidescape";
56 changelog = "https://github.com/SteveEasley/pykaleidescape/releases/tag/${src.tag}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ fab ];
59 };
60}