1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, http-message-signatures
5, http-sfv
6, requests
7, pytestCheckHook
8, pythonOlder
9, setuptools-scm
10}:
11
12buildPythonPackage rec {
13 pname = "requests-http-signature";
14 version = "0.7.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "pyauth";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-sW2vYqT/nY27DvEKHdptc3dUpuqKmD7PLMs+Xp+cpeU=";
24 };
25
26 SETUPTOOLS_SCM_PRETEND_VERSION = version;
27
28 nativeBuildInputs = [
29 setuptools-scm
30 ];
31
32 propagatedBuildInputs = [
33 http-message-signatures
34 http-sfv
35 requests
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ];
41
42 pytestFlagsArray = [
43 "test/test.py"
44 ];
45
46 disabledTests = [
47 # Test require network access
48 "test_readme_example"
49 ];
50
51 pythonImportsCheck = [
52 "requests_http_signature"
53 ];
54
55 meta = with lib; {
56 description = "Requests authentication module for HTTP Signature";
57 homepage = "https://github.com/kislyuk/requests-http-signature";
58 license = licenses.asl20;
59 maintainers = with maintainers; [ mmai ];
60 };
61}