1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hypothesis,
6 ifaddr,
7 lxml,
8 poetry-core,
9 pytest-vcr,
10 pytestCheckHook,
11 pythonOlder,
12 requests,
13 urllib3,
14}:
15
16buildPythonPackage rec {
17 pname = "pywemo";
18 version = "1.4.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "pywemo";
25 repo = "pywemo";
26 tag = version;
27 hash = "sha256-XpCRrCJYHv1so5/aHoGrtkgp3RX1NUKPUawJqK/FaG0=";
28 };
29
30 nativeBuildInputs = [ poetry-core ];
31
32 propagatedBuildInputs = [
33 ifaddr
34 lxml
35 requests
36 urllib3
37 ];
38
39 __darwinAllowLocalNetworking = true;
40
41 nativeCheckInputs = [
42 hypothesis
43 pytest-vcr
44 pytestCheckHook
45 ];
46
47 pythonImportsCheck = [ "pywemo" ];
48
49 meta = with lib; {
50 description = "Python module to discover and control WeMo devices";
51 homepage = "https://github.com/pywemo/pywemo";
52 changelog = "https://github.com/pywemo/pywemo/releases/tag/${version}";
53 license = with licenses; [ mit ];
54 maintainers = with maintainers; [ fab ];
55 };
56}