1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 mock,
6 pykerberos,
7 pytestCheckHook,
8 pythonOlder,
9 requests-credssp,
10 requests-ntlm,
11 requests,
12 setuptools,
13 xmltodict,
14}:
15
16buildPythonPackage rec {
17 pname = "pywinrm";
18 version = "0.5.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-VCjrHklK95VFRs1P8Vye8aMKdeBbJaOf1gbO8iIB6fE=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 requests
32 requests-ntlm
33 xmltodict
34 ];
35
36 optional-dependencies = {
37 credssp = [ requests-credssp ];
38 kerberos = [ pykerberos ];
39 };
40
41 nativeCheckInputs = [
42 mock
43 pytestCheckHook
44 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
45
46 pythonImportsCheck = [ "winrm" ];
47
48 pytestFlagsArray = [ "winrm/tests/" ];
49
50 meta = with lib; {
51 description = "Python library for Windows Remote Management";
52 homepage = "https://github.com/diyan/pywinrm";
53 changelog = "https://github.com/diyan/pywinrm/blob/v${version}/CHANGELOG.md";
54 license = licenses.mit;
55 maintainers = with maintainers; [
56 elasticdog
57 kamadorueda
58 ];
59 };
60}