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 = "2.0.0";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-s9/669iE2M13hJQ2lgOp57WNKREb9rQb3C3NhyA69Ok=";
20 };
21
22 propagatedBuildInputs = [
23 oauthlib
24 requests
25 ];
26
27 nativeCheckInputs = [
28 mock
29 pytestCheckHook
30 requests-mock
31 ];
32
33 disabledTests = [
34 # Exclude tests which require network access
35 "testCanPostBinaryData"
36 "test_content_type_override"
37 "test_url_is_native_str"
38 # too narrow time comparison
39 "test_fetch_access_token"
40 ];
41
42 # Requires selenium and chrome
43 disabledTestPaths = [ "tests/examples/test_native_spa_pkce_auth0.py" ];
44
45 pythonImportsCheck = [ "requests_oauthlib" ];
46
47 meta = with lib; {
48 description = "OAuthlib authentication support for Requests";
49 homepage = "https://github.com/requests/requests-oauthlib";
50 license = with licenses; [ isc ];
51 maintainers = with maintainers; [ prikhi ];
52 };
53}