1{ lib
2, buildPythonPackage
3, click
4, fetchFromGitHub
5, pytest-asyncio
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "pywizlight";
12 version = "0.5.14";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "sbidy";
19 repo = pname;
20 rev = "v${version}";
21 hash = "sha256-IkuAYEg5nuUT6zxmuJe6afp4MVWf0+HAnEoAdOrdTvQ=";
22 };
23
24 propagatedBuildInputs = [
25 click
26 ];
27
28 nativeCheckInputs = [
29 pytest-asyncio
30 pytestCheckHook
31 ];
32
33 pytestFlagsArray = [
34 "--asyncio-mode=auto"
35 ];
36
37 disabledTests = [
38 # Tests requires network features (e. g., discovery testing)
39 "test_Bulb_Discovery"
40 "test_timeout"
41 "test_timeout_PilotBuilder"
42 "test_error_PilotBuilder_warm_wite"
43 "test_error_PilotBuilder_cold_white_lower"
44 ];
45
46 pythonImportsCheck = [
47 "pywizlight"
48 ];
49
50 meta = with lib; {
51 description = "Python connector for WiZ light bulbs";
52 homepage = "https://github.com/sbidy/pywizlight";
53 changelog = "https://github.com/sbidy/pywizlight/releases/tag/v${version}";
54 license = with licenses; [ mit ];
55 maintainers = with maintainers; [ fab ];
56 };
57}