## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-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*}}%{?dist} ## END: Set by rpmautospec %if 0%{?rhel} %if 0%{?el9} # Skip tests on EL9 due to missing dependencies %bcond_with check %else %bcond_without check %endif # pypandoc is an optional dependency and is not available in EPEL %bcond_with doc %else %bcond_without check %bcond_without doc %endif # Created by pyp2rpm-3.3.5 %global pypi_name dcrpm Name: python-%{pypi_name} Version: 0.6.3 Release: %autorelease Summary: A tool to detect and correct common issues around RPM database corruption License: GPLv2 URL: https://github.com/facebookincubator/dcrpm Source: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(psutil) BuildRequires: python3dist(setuptools) %if %{with check} BuildRequires: python3dist(pytest) BuildRequires: python3dist(testslide) BuildRequires: dnf BuildRequires: libdb-utils %endif %if %{with doc} BuildRequires: python3dist(pypandoc) %endif %global _description %{expand: dcrpm is a tool to detect and correct common issues around RPM database corruption.} %description %{_description} %package -n %{pypi_name} Summary: %{summary} %if 0%{?fedora} < 33 || 0%{?rhel} < 9 %py_provides python3-%{pypi_name} %endif Requires: python3dist(psutil) Requires: python3dist(setuptools) Requires: lsof Recommends: libdb-utils %description -n %{pypi_name} %{_description} %prep %autosetup -n %{pypi_name}-%{version} -p1 # Remove unnecessary shebang sed -e '\|#!/usr/bin/env python|d' -i dcrpm/*.py # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %if 0%{?el8} # needed with setuptools < 40.9.0 mv legacy_setup.py setup.py %endif %build %py3_build %install %py3_install %check %py3_check_import %{pypi_name} %if %{with check} %pytest -v %endif %files -n %{pypi_name} %license LICENSE %doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md %doc HISTORY.md MANUAL_RPM_CLEANUP.md %{_bindir}/dcrpm %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog * Fri Apr 08 2022 Michel Alexandre Salim 0.6.3-1 - Update to 0.6.3 * Tue Apr 05 2022 Michel Alexandre Salim - 0.6.2-8 - Adjust spec to build on EPEL 9 - Drop unused deprecated python3-mock test dependency - Switch test runner to pytest * Fri Jan 21 2022 Fedora Release Engineering - 0.6.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.6.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.6.2-5 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.6.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Jan 23 2021 Davide Cavalca - 0.6.2-3 - Enable tests for EPEL builds * Sun Jan 3 2021 Davide Cavalca - 0.6.2-2 - Update patches * Wed Dec 30 2020 Davide Cavalca - 0.6.2-1 - Initial package.