1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, libssh
6, cython
7, wheel
8, setuptools
9, setuptools-scm
10, toml
11, expandvars
12}:
13
14buildPythonPackage rec {
15 pname = "ansible-pylibssh";
16 version = "1.1.0";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-spaGux6dYvtUtpOdU6oN7SEn8IgBof2NpQSPvr+Zplg=";
24 };
25
26 # remove after https://github.com/ansible/pylibssh/pull/502 is merged
27 postPatch = ''
28 sed -i "/setuptools_scm_git_archive/d" pyproject.toml
29 '';
30
31 nativeBuildInputs = [
32 cython
33 wheel
34 setuptools
35 setuptools-scm
36 toml
37 expandvars
38 ];
39
40 propagatedBuildInputs = [
41 libssh
42 ];
43
44 pythonImportsCheck = [
45 "pylibsshext"
46 ];
47
48 meta = with lib; {
49 description = "Python bindings to client functionality of libssh specific to Ansible use case";
50 homepage = "https://github.com/ansible/pylibssh";
51 license = licenses.lgpl21Plus;
52 maintainers = with maintainers; [ geluk ];
53 };
54}