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