1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 callee,
7 cryptography,
8 fetchFromGitHub,
9 mock,
10 poetry-core,
11 poetry-dynamic-versioning,
12 pyjwt,
13 pyopenssl,
14 pytestCheckHook,
15 pythonOlder,
16 pythonRelaxDepsHook,
17 requests,
18 urllib3,
19}:
20
21buildPythonPackage rec {
22 pname = "auth0-python";
23 version = "4.7.1";
24 pyproject = true;
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchFromGitHub {
29 owner = "auth0";
30 repo = "auth0-python";
31 rev = "refs/tags/${version}";
32 hash = "sha256-udtrvAr8wfg1DbNbBEjA/tlrYhIiXtTFqi4bZCuKI0Q=";
33 };
34
35 nativeBuildInputs = [
36 poetry-core
37 poetry-dynamic-versioning
38 pythonRelaxDepsHook
39 ];
40
41 propagatedBuildInputs = [
42 aiohttp
43 cryptography
44 pyjwt
45 pyopenssl
46 requests
47 urllib3
48 ] ++ pyjwt.optional-dependencies.crypto;
49
50 nativeCheckInputs = [
51 aiohttp
52 aioresponses
53 callee
54 mock
55 pytestCheckHook
56 ];
57
58 pythonRelaxDeps = [ "cryptography" ];
59
60 disabledTests = [
61 # Tries to ping websites (e.g. google.com)
62 "can_timeout"
63 "test_options_are_created_by_default"
64 "test_options_are_used_and_override"
65 ];
66
67 pythonImportsCheck = [ "auth0" ];
68
69 meta = with lib; {
70 description = "Auth0 Python SDK";
71 homepage = "https://github.com/auth0/auth0-python";
72 changelog = "https://github.com/auth0/auth0-python/blob/${version}/CHANGELOG.md";
73 license = licenses.mit;
74 maintainers = with maintainers; [ ];
75 };
76}