%global srcname reclass Name: python-%{srcname} Version: 1.7.0 Release: 0.2%{?dist} Summary: A recursive external node classifier for configuration management systems License: Artistic-1.0-Perl URL: https://github.com/salt-formulas/reclass Source0: https://github.com/salt-formulas/reclass/archive/refs/tags/v%{version}.tar.gz#/reclass-%{version}.tar.gz Patch0: %{srcname}-%{version}-Fix-running-tests-without-mock-installed-systemwide.patch Patch1: %{srcname}-%{version}-Add-support-for-collections.abc-in-Python-gt-3.8.patch Patch2: %{srcname}-%{version}-setup.py-Fix-dependencies.patch Patch3: %{srcname}-%{version}-tests-Replace-deprecated-assertEquals.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools %if !0%{?rhel} BuildRequires: python3-pip BuildRequires: python3-wheel %endif BuildRequires: python3-pyparsing BuildRequires: python3-pyyaml BuildRequires: python3-six BuildRequires: make BuildRequires: python3-sphinx BuildRequires: python3dist(pytest) BuildRequires: python3-ddt %global _description %{expand: reclass is an "external node classifier" (ENC) as can be used with automation tools, such as Puppet, Salt, and Ansible. It is also a stand-alone tool for merging data sources recursively.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %build %if !0%{?rhel} %pyproject_wheel %else %py3_build %endif pushd doc make man popd %install %if !0%{?rhel} %pyproject_install %else %py3_install %endif install -d %{buildroot}%{_mandir}/man1 cp -p doc/build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/ %check %pytest %files -n python3-%{srcname} %license LICENSE %doc README.rst README-extensions.rst %{_bindir}/* %{python3_sitelib}/* %{_mandir}/man1/%{srcname}.1.* %changelog * Sun Mar 03 2024 Reto Gantenbein 1.7.0-0.2 - Use unittest.mock, fix EPEL builds * Sat Oct 21 2023 Reto Gantenbein 1.7.0-0.1 - Initial package release