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 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "tetienne";
22 repo = "somfy-open-api";
23 tag = "v${version}";
24 hash = "sha256-G/4aBtsN20QtQnMiBBQWg0mqrmR8FuU2f9g77qvk8nI=";
25 };
26
27 pythonRelaxDeps = [ "requests-oauthlib" ];
28
29 build-system = [ poetry-core ];
30
31 dependencies = [
32 requests
33 requests-oauthlib
34 ];
35
36 nativeCheckInputs = [
37 httpretty
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [ "pymfy" ];
42
43 meta = with lib; {
44 description = "Python client for the Somfy Open API";
45 homepage = "https://github.com/tetienne/somfy-open-api";
46 changelog = "https://github.com/tetienne/somfy-open-api/releases/tag/v${version}";
47 license = licenses.gpl3Only;
48 maintainers = with maintainers; [ fab ];
49 };
50}