1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpx,
6 pytestCheckHook,
7 pythonOlder,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "requests-aws4auth";
14 version = "1.3.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "tedder";
21 repo = "requests-aws4auth";
22 tag = "v${version}";
23 hash = "sha256-tRo38fdWqZmutGhWv8Hks+oFaLv770RlAHYgS3S6xJA=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ requests ];
29
30 optional-dependencies = {
31 httpx = [ httpx ];
32 };
33
34 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.httpx;
35
36 pythonImportsCheck = [ "requests_aws4auth" ];
37
38 meta = with lib; {
39 description = "Amazon Web Services version 4 authentication for the Python Requests library";
40 homepage = "https://github.com/sam-washington/requests-aws4auth";
41 changelog = "https://github.com/tedder/requests-aws4auth/releases/tag/v${version}";
42 license = licenses.mit;
43 maintainers = with maintainers; [ basvandijk ];
44 };
45}