## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname pytest-testinfra %global pkgname python-pytest-testinfra %global slugname pytest_testinfra %global forgeurl https://github.com/pytest-dev/pytest-testinfra %global common_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.} %bcond_without doc %bcond_without tests Name: %{pkgname} Version: 7.0.0 %forgemeta Release: %autorelease Summary: Unit testing for config-managed server state URL: %{forgeurl} Source: %{pypi_source} License: ASL 2.0 BuildArch: noarch ######################################################################## # Package info # ######################################################################## %description %{common_description} %package -n python3-%{srcname} Summary: %summary ######################################################################## # Package requirements # ######################################################################## BuildRequires: python3-devel # testing requirements %if %{with tests} BuildRequires: python3dist(salt) BuildRequires: python3dist(pywinrm) BuildRequires: python3dist(ansible) BuildRequires: python3dist(paramiko) %endif # docs requirements %if %{with doc} BuildRequires: python3dist(sphinx) %endif %py_provides python3-%{srcname} %description -n python3-%{srcname} %{common_description} %generate_buildrequires %pyproject_buildrequires %{?with_tests:-x test} %{?with_doc:-x docs} # Requires: (python3dist(ansible-core) or python3dist(ansible)) # Requires: python3dist(pywinrm) # Requires: python3dist(paramiko) # Suggests: python3dist(pytest-xdist) ######################################################################## # Prep # ######################################################################## %prep %autosetup -n %{srcname}-%{version} ######################################################################## # Build # ######################################################################## %build %pyproject_wheel # generate html docs %if %{with doc} sphinx-build-3 doc/source html rm -vr html/.{doctrees,buildinfo} %endif ######################################################################## # Install # ######################################################################## %install %pyproject_install ######################################################################## # Tests # ######################################################################## %if %{with tests} %check %{pytest} test -v %endif ######################################################################## # Python package files # ######################################################################## %files -n python3-%{srcname} %license LICENSE %doc *.rst %if %{with doc} %doc html %endif %{python3_sitelib}/testinfra/ %{python3_sitelib}/%{slugname}-%{version}.dist-info ######################################################################## # Changelog # ######################################################################## %changelog * Thu Feb 09 2023 chedi toueiti - 7.0.0-1 - Update to version 7.0.0 (#2150474) * Fri Jan 20 2023 Fedora Release Engineering - 6.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 6.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 28 2022 chedi toueiti - 6.8.0-2 - RPMAUTOSPEC: unresolvable merge