1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpretty,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9 requests,
10 requests-oauthlib,
11}:
12
13buildPythonPackage rec {
14 pname = "pymfy";
15 version = "0.11.0";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "tetienne";
22 repo = "somfy-open-api";
23 rev = "v${version}";
24 sha256 = "0wpjwjmywfyqgwvfa5kwcjpaljc32qa088kk88nl9nqdvc31mzhv";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 propagatedBuildInputs = [
30 requests
31 requests-oauthlib
32 ];
33
34 nativeCheckInputs = [
35 httpretty
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "pymfy" ];
40
41 meta = with lib; {
42 description = "Python client for the Somfy Open API";
43 homepage = "https://github.com/tetienne/somfy-open-api";
44 license = with licenses; [ gpl3Only ];
45 maintainers = with maintainers; [ fab ];
46 };
47}