1{ lib
2, buildPythonPackage
3, click
4, defusedxml
5, dicttoxml
6, fetchFromGitHub
7, httpx
8, pycryptodome
9, pytest-asyncio
10, pytest-raises
11, pytestCheckHook
12, pythonOlder
13, respx
14, typing-extensions
15}:
16
17buildPythonPackage rec {
18 pname = "ismartgate";
19 version = "5.0.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "bdraco";
26 repo = pname;
27 rev = "refs/tags/v${version}";
28 hash = "sha256-o2yzMxrF0WB6MbeL1Tuf0Sq4wS4FDIWZZx1x2rvwLmY=";
29 };
30
31 postPatch = ''
32 substituteInPlace setup.py \
33 --replace '"pytest-runner>=5.2",' ""
34 '';
35
36 propagatedBuildInputs = [
37 click
38 defusedxml
39 dicttoxml
40 httpx
41 pycryptodome
42 typing-extensions
43 ];
44
45 nativeCheckInputs = [
46 pytest-asyncio
47 pytest-raises
48 pytestCheckHook
49 respx
50 ];
51
52 pythonImportsCheck = [
53 "ismartgate"
54 ];
55
56 meta = with lib; {
57 description = "Python module to work with the ismartgate and gogogate2 API";
58 homepage = "https://github.com/bdraco/ismartgate";
59 changelog = "https://github.com/bdraco/ismartgate/releases/tag/v${version}";
60 license = with licenses; [ mit ];
61 maintainers = with maintainers; [ fab ];
62 };
63}