1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 fetchFromGitHub,
6 gssapi,
7 krb5,
8 ruamel-yaml,
9 pytest-mock,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13 glibcLocales,
14}:
15
16buildPythonPackage rec {
17 pname = "pyspnego";
18 version = "0.12.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "jborean93";
25 repo = "pyspnego";
26 tag = "v${version}";
27 hash = "sha256-dkss+8Z0dS4MTunBZWEH+WK1+kGikCHf7VPCR1reMS0=";
28 };
29
30 nativeBuildInputs = [ setuptools ];
31
32 propagatedBuildInputs = [ cryptography ];
33
34 optional-dependencies = {
35 kerberos = [
36 gssapi
37 krb5
38 ];
39 yaml = [ ruamel-yaml ];
40 };
41
42 pythonImportsCheck = [ "spnego" ];
43
44 nativeCheckInputs = [
45 glibcLocales
46 pytest-mock
47 pytestCheckHook
48 ];
49
50 env.LC_ALL = "en_US.UTF-8";
51
52 meta = with lib; {
53 changelog = "https://github.com/jborean93/pyspnego/blob/${src.tag}/CHANGELOG.md";
54 description = "Python SPNEGO authentication library";
55 mainProgram = "pyspnego-parse";
56 homepage = "https://github.com/jborean93/pyspnego";
57 license = with licenses; [ mit ];
58 maintainers = with maintainers; [ fab ];
59 };
60}