%bcond tests 1 Name: bindep Version: 2.11.0 Release: 1%{?dist} Summary: Binary dependency utility License: Apache-2.0 URL: https://docs.opendev.org/opendev/bindep Source: %{pypi_source bindep} BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: %{py3_dist pytest} %endif %description Bindep is a tool for checking the presence of binary packages needed to use an application / library. %prep %autosetup -p1 # Remove dependencies unwanted in Fedora sed -iE '/(pytest-cov|mock)/d' test-requirements.txt find -type f -name '*.py' | xargs -d'\n' sed -i \ -e 's/^\( *\)import mock/\1from unittest import mock/' \ -e 's/^\( *\)from mock import /\1from unittest.mock import /' %generate_buildrequires %pyproject_buildrequires %{?with_tests:test-requirements.txt} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files bindep %check %pytest \ -s \ -k 'not test_arch_implies_pacman and not test_manjaro_implies_pacman' %files -f %{pyproject_files} %license LICENSE %doc README.rst doc/source/*.rst %{_bindir}/bindep %changelog * Tue Aug 15 2023 Maxwell G - 2.11.0-1 - Initial package.