%global __python3 /usr/bin/python3.12 %global python3_pkgversion 3.12 Name: python%{python3_pkgversion}-pytest-testinfra Version: 10.1.0 Release: 2%{?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}-pytest BuildRequires: python%{python3_pkgversion}-wheel Suggests: python%{python3_pkgversion}-winrm Suggests: ansible %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} %description -n python3-pytest-testinfra %_description %prep %autosetup -p1 -n pytest-testinfra-%{version} # remove setuptools_scm dependency since we don't have it in RHEL sed -i '/setup_requires =/d' setup.cfg sed -i '/setuptools_scm/d' setup.cfg sed -i 's/use_scm_version = True/use_scm_version = False/g' setup.cfg # since setuptools_scm is not available we need to sed out it's usage from setup.py and set the correct version echo -e "import setuptools\nsetuptools.setup(version='%{version}')" > setup.py cat setup.cfg %build %py3_build %install %py3_install %check # TODO %files -n python%{python3_pkgversion}-pytest-testinfra %{python3_sitelib}/pytest_testinfra-*.egg-info/ %{python3_sitelib}/testinfra/ %doc README.rst %changelog * Wed Jun 26 2024 Martin Hoyer - 10.1.0-5 - RHEL-8 base package for copr