1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, aiohttp
6, netifaces
7, pytest-aio
8, pytest-asyncio
9, pytestCheckHook
10, setuptools-scm
11}:
12
13buildPythonPackage rec {
14 pname = "python-izone";
15 version = "1.2.9";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "Swamp-Ig";
22 repo = "pizone";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-0rj+tKn2pbFe+nczTMGLwIwmc4jCznGGF4/IMjlEvQg=";
25 };
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 SETUPTOOLS_SCM_PRETEND_VERSION = version;
32
33 propagatedBuildInputs = [
34 aiohttp
35 netifaces
36 ];
37
38 nativeCheckInputs = [
39 pytest-aio
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 doCheck = false; # most tests access network
45
46 pythonImportsCheck = [
47 "pizone"
48 ];
49
50 meta = with lib; {
51 description = "Python interface to the iZone airconditioner controller";
52 homepage = "https://github.com/Swamp-Ig/pizone";
53 license = licenses.gpl3Plus;
54 maintainers = with maintainers; [ dotlambda ];
55 };
56}