1{
2 lib,
3 buildPythonPackage,
4 click,
5 colorama,
6 configparser,
7 distro,
8 fetchFromGitHub,
9 gevent,
10 jinja2,
11 packaging,
12 paramiko,
13 pytestCheckHook,
14 python-dateutil,
15 pythonOlder,
16 pywinrm,
17 pyyaml,
18 setuptools,
19 typeguard,
20 typing-extensions,
21}:
22
23buildPythonPackage rec {
24 pname = "pyinfra";
25 version = "3.1.1";
26 pyproject = true;
27
28 disabled = pythonOlder "3.10";
29
30 src = fetchFromGitHub {
31 owner = "Fizzadar";
32 repo = "pyinfra";
33 rev = "refs/tags/v${version}";
34 hash = "sha256-NHQpYOXlqFU4BtiwiESGV8pM0O8kqCz2TpXOGz8T4zQ=";
35 };
36
37 build-system = [ setuptools ];
38
39 dependencies = [
40 click
41 colorama
42 configparser
43 distro
44 gevent
45 jinja2
46 packaging
47 paramiko
48 python-dateutil
49 pywinrm
50 pyyaml
51 setuptools
52 typeguard
53 ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
54
55 nativeCheckInputs = [ pytestCheckHook ];
56
57 pythonImportsCheck = [ "pyinfra" ];
58
59 disabledTests = [
60 # Test requires SSH binary
61 "test_load_ssh_config"
62 ];
63
64 meta = with lib; {
65 description = "Python-based infrastructure automation";
66 longDescription = ''
67 pyinfra automates/provisions/manages/deploys infrastructure. It can be used for
68 ad-hoc command execution, service deployment, configuration management and more.
69 '';
70 homepage = "https://pyinfra.com";
71 downloadPage = "https://pyinfra.com/Fizzadar/pyinfra/releases";
72 changelog = "https://github.com/Fizzadar/pyinfra/blob/v${version}/CHANGELOG.md";
73 license = licenses.mit;
74 maintainers = with maintainers; [ totoroot ];
75 mainProgram = "pyinfra";
76 };
77}