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