%global __python3 /usr/bin/python3.12 %global python3_pkgversion 3.12 Name: python%{python3_pkgversion}-pytest-testinfra Version: 10.2.2 Release: 1%{?dist} Summary: Unit testing for config-managed server state License: Apache-2.0 URL: https://github.com/pytest-dev/pytest-testinfra Source: %{pypi_source pytest_testinfra} BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: pyproject-rpm-macros %global _description %{expand: With Testinfra you can write unit tests in Python to test actual state of your servers configured by management tools like Salt, Ansible, Puppet, Chef and so on. Testinfra aims to be a Serverspec equivalent in python and is written as a plugin to the powerful Pytest test engine.} %description %_description %package -n python3-pytest-testinfra Summary: %{summary} Requires: python%{python3_pkgversion}-pytest Suggests: python%{python3_pkgversion}-winrm Suggests: ansible-core Suggests: python%{python3_pkgversion}-ansible-pylibssh %description -n python3-pytest-testinfra %_description %prep %autosetup -p1 -n pytest_testinfra-%{version} # types-paramiko package is not available and is not needed for build tests sed -i '/types-paramiko/d' pyproject.toml # Use setuptools on EPEL8 sed -i 's/hatchling", "hatch-vcs/setuptools/g' pyproject.toml sed -i 's/hatchling.build/setuptools.build_meta/g' pyproject.toml sed -i '/license-files/d' pyproject.toml printf '\n[tool.setuptools.packages.find]\ninclude = [\"testinfra*\"]\n' >> pyproject.toml %build %pyproject_wheel %install %pyproject_install %pyproject_save_files testinfra %files -n python3-pytest-testinfra -f %{pyproject_files} %doc README.rst