%global srcname pytest-enabler Name: python-%{srcname} Version: 3.1.1 Release: 1%{?dist} Summary: Pytest plugin to enable plugins if present License: MIT URL: https://github.com/jaraco/pytest-enabler Source0: %pypi_source BuildArch: noarch BuildRequires: python3-devel # https://github.com/jaraco/pytest-enabler/issues/1 BuildConflicts: python3dist(pytest-xdist) %global _description %{expand: The enabler plugin allows configuration of plugins if present, but omits the settings if the plugin is not present. For example, the following config enables black to be enabled when present: [tool.pytest-enabler.black] addopts = "--black" Then, to temporarily disable a plugin, use pytest''s built-in support for disabling a plugin: pytest -p no:black} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %generate_buildrequires %pyproject_buildrequires -t %prep %autosetup -n %{srcname}-%{version} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l pytest_enabler %check # jaraco-packaging uses an isolated environment by default, which will install packages from the network # set $BUILD_ENVIRONMENT to something other than "isolated" to disable this behavior BUILD_ENVIRONMENT=. %tox %files -n python3-%{srcname} -f %{pyproject_files} %doc NEWS.rst README.rst %changelog * Mon Jul 8 2024 David Shea - 3.1.1-1 - Initial package