1{
2 lib,
3 argcomplete,
4 buildPythonPackage,
5 fetchFromGitHub,
6 fetchpatch2,
7 httpx,
8 mock,
9 pytestCheckHook,
10 requests,
11 responses,
12 setuptools,
13 typing-extensions,
14 urllib3,
15}:
16
17buildPythonPackage rec {
18 pname = "amcrest";
19 version = "1.9.9";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "tchellomello";
24 repo = "python-amcrest";
25 tag = version;
26 hash = "sha256-UPxs/sL8ZpUf29fpQFnLY4tV7qSQIxm0UVSl6Pm1dAY=";
27 };
28
29 patches = [
30 (fetchpatch2 {
31 # https://github.com/tchellomello/python-amcrest/pull/240
32 name = "distutils-str2bool.patch";
33 url = "https://github.com/tchellomello/python-amcrest/commit/9cced67d643da6c33d92e85dde22e01b44fb0936.patch";
34 hash = "sha256-i9UeYo43Eiwz06KfWyVQUPTLCJLmMjjNcjA7ZQcPIqQ=";
35 })
36 ];
37
38 build-system = [ setuptools ];
39
40 dependencies = [
41 argcomplete
42 httpx
43 requests
44 urllib3
45 typing-extensions
46 ];
47
48 nativeCheckInputs = [
49 mock
50 pytestCheckHook
51 responses
52 ];
53
54 pythonImportsCheck = [ "amcrest" ];
55
56 meta = with lib; {
57 description = "Python module for Amcrest and Dahua Cameras";
58 homepage = "https://github.com/tchellomello/python-amcrest";
59 changelog = "https://github.com/tchellomello/python-amcrest/releases/tag/${src.tag}";
60 license = licenses.gpl2Only;
61 maintainers = with maintainers; [ fab ];
62 };
63}