%global srcname ansible-pylibssh %global _summary Python bindings specific to Ansible use case for libssh Name: python-%{srcname}-epel Version: 1.1.0 Release: 1%{?dist} Summary: %{_summary} License: LGPLv2 URL: https://github.com/ansible/pylibssh Source0: %{pypi_source} # Remove toml dep # https://github.com/ansible/pylibssh/issues/504 Patch0: python-ansible-pylibssh-tomllib.patch # Disable coverage Patch1: python-ansible-pylibssh-nocov.patch BuildRequires: gcc BuildRequires: libssh-devel BuildRequires: python%{python3_pkgversion}-devel # For tests BuildRequires: /usr/bin/ssh-keygen BuildRequires: /usr/sbin/sshd %global _description %{expand: Python bindings to client functionality of libssh specific to Ansible use case.} %description %_description %package -n python%{python3_pkgversion}-%{srcname} Summary: %{_summary} %description -n python%{python3_pkgversion}-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} sed -i -e '/cov/d' pytest.ini %generate_buildrequires %pyproject_buildrequires -t %build export PYTHONPATH=bin %pyproject_wheel %install %pyproject_install %pyproject_save_files -l '*pylibssh*' %check # Fails - need to disable cython coverage %tox -- -- --deselect tests/unit/scp_test.py::test_get --deselect tests/unit/scp_test.py::test_put %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc AUTHORS.rst README.rst %changelog * Fri May 24 2024 Orion Poplawski - 1.1.0-1 - Initial Fedora package