1{ 2 lib, 3 buildPythonPackage, 4 cryptography, 5 defusedxml, 6 fetchFromGitHub, 7 httpretty, 8 lxml, 9 oauthlib, 10 pyjwt, 11 pytest-xdist, 12 pytestCheckHook, 13 python-jose, 14 python3-openid, 15 python3-saml, 16 pythonOlder, 17 requests, 18 requests-oauthlib, 19 responses, 20 setuptools, 21 typing-extensions, 22}: 23 24buildPythonPackage rec { 25 pname = "social-auth-core"; 26 version = "4.7.0"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.7"; 30 31 src = fetchFromGitHub { 32 owner = "python-social-auth"; 33 repo = "social-core"; 34 tag = version; 35 hash = "sha256-PQPnLTTCAUE1UmaDRmEXLozY0607e2/fLsvzcJzo4bQ="; 36 }; 37 38 nativeBuildInputs = [ setuptools ]; 39 40 propagatedBuildInputs = [ 41 cryptography 42 defusedxml 43 oauthlib 44 pyjwt 45 python3-openid 46 requests 47 requests-oauthlib 48 ]; 49 50 optional-dependencies = { 51 openidconnect = [ python-jose ]; 52 saml = [ 53 lxml 54 python3-saml 55 ]; 56 azuread = [ cryptography ]; 57 }; 58 59 nativeCheckInputs = [ 60 pytest-xdist 61 pytestCheckHook 62 httpretty 63 responses 64 typing-extensions 65 ] 66 ++ lib.flatten (lib.attrValues optional-dependencies); 67 68 disabledTestPaths = [ 69 # missing google-auth-stubs 70 "social_core/tests/backends/test_google.py" 71 72 # network access 73 "social_core/tests/backends/test_steam.py::SteamOpenIdMissingSteamIdTest::test_login" 74 "social_core/tests/backends/test_steam.py::SteamOpenIdMissingSteamIdTest::test_partial_pipeline" 75 ]; 76 77 pythonImportsCheck = [ "social_core" ]; 78 79 meta = with lib; { 80 description = "Module for social authentication/registration mechanisms"; 81 homepage = "https://github.com/python-social-auth/social-core"; 82 changelog = "https://github.com/python-social-auth/social-core/blob/${src.tag}/CHANGELOG.md"; 83 license = licenses.bsd3; 84 maintainers = with maintainers; [ ]; 85 }; 86}