1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, dataclasses-json
6, pycryptodome
7, setuptools-scm
8, pytest-asyncio
9, pytest-cases
10, pytestCheckHook
11, pytz
12}:
13
14buildPythonPackage rec {
15 pname = "pysiaalarm";
16 version = "3.1.1";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-q42bsBeAwU9lt7wtYGFJv23UBND+aMXZJlSWyTfZDQE=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.cfg \
27 --replace "==" ">="
28 substituteInPlace pytest.ini \
29 --replace "--cov pysiaalarm --cov-report term-missing" ""
30 '';
31
32 nativeBuildInputs = [
33 setuptools-scm
34 ];
35
36 propagatedBuildInputs = [
37 dataclasses-json
38 pycryptodome
39 pytz
40 ];
41
42 nativeCheckInputs = [
43 pytest-asyncio
44 pytest-cases
45 pytestCheckHook
46 ];
47
48 pythonImportsCheck = [
49 "pysiaalarm"
50 "pysiaalarm.aio"
51 ];
52
53 meta = with lib; {
54 description = "Python package for creating a client that talks with SIA-based alarm systems";
55 homepage = "https://github.com/eavanvalkenburg/pysiaalarm";
56 changelog = "https://github.com/eavanvalkenburg/pysiaalarm/releases/tag/v${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ dotlambda ];
59 };
60}