1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 mock,
6 oauthlib,
7 pytestCheckHook,
8 requests,
9 requests-mock,
10}:
11
12buildPythonPackage rec {
13 pname = "requests-oauthlib";
14 version = "1.3.1";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-db6sSkeIHuuU1epdatMe+IhWr/4jMrmq+1LGRSzPDXo=";
20 };
21
22 propagatedBuildInputs = [
23 oauthlib
24 requests
25 ];
26
27 nativeCheckInputs = [
28 mock
29 pytestCheckHook
30 requests-mock
31 ];
32
33 # Exclude tests which require network access
34 disabledTests = [
35 "testCanPostBinaryData"
36 "test_content_type_override"
37 "test_url_is_native_str"
38 ];
39
40 pythonImportsCheck = [ "requests_oauthlib" ];
41
42 meta = with lib; {
43 description = "OAuthlib authentication support for Requests";
44 homepage = "https://github.com/requests/requests-oauthlib";
45 license = with licenses; [ isc ];
46 maintainers = with maintainers; [ prikhi ];
47 };
48}