about summary refs log tree commit diff
path: root/pkgs/development/python-modules/requests-oauthlib/default.nix
blob: 27b2ae885573a9e3b73cdfbed76eec46520141d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
  lib,
  buildPythonPackage,
  fetchPypi,
  mock,
  oauthlib,
  pytestCheckHook,
  requests,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "requests-oauthlib";
  version = "2.0.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-s9/669iE2M13hJQ2lgOp57WNKREb9rQb3C3NhyA69Ok=";
  };

  propagatedBuildInputs = [
    oauthlib
    requests
  ];

  nativeCheckInputs = [
    mock
    pytestCheckHook
    requests-mock
  ];

  # Exclude tests which require network access
  disabledTests = [
    "testCanPostBinaryData"
    "test_content_type_override"
    "test_url_is_native_str"
  ];

  # Requires selenium and chrome
  disabledTestPaths = [ "tests/examples/test_native_spa_pkce_auth0.py" ];

  pythonImportsCheck = [ "requests_oauthlib" ];

  meta = with lib; {
    description = "OAuthlib authentication support for Requests";
    homepage = "https://github.com/requests/requests-oauthlib";
    license = with licenses; [ isc ];
    maintainers = with maintainers; [ prikhi ];
  };
}