1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpx,
6 poetry-core,
7 pytest-asyncio,
8 pytestCheckHook,
9 pythonOlder,
10 respx,
11}:
12
13buildPythonPackage rec {
14 pname = "pyecoforest";
15 version = "0.4.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "pjanuario";
22 repo = "pyecoforest";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-C8sFq0vsVsq6irWbRd0eq18tfKu0qRRBZHt23CiDTGU=";
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace-fail "--cov=pyecoforest --cov-report=term-missing:skip-covered" ""
30 '';
31
32 build-system = [ poetry-core ];
33
34 dependencies = [ httpx ];
35
36 nativeCheckInputs = [
37 pytest-asyncio
38 pytestCheckHook
39 respx
40 ];
41
42 pythonImportsCheck = [ "pyecoforest" ];
43
44 meta = with lib; {
45 description = "Module for interacting with Ecoforest devices";
46 homepage = "https://github.com/pjanuario/pyecoforest";
47 changelog = "https://github.com/pjanuario/pyecoforest/blob/${version}/CHANGELOG.md";
48 license = licenses.mit;
49 maintainers = with maintainers; [ fab ];
50 };
51}