%global pypi_name pytest-travis-fold %global pypi_name_with_underscore %(echo "%{pypi_name}" | sed "s/-/_/g") Name: python-%{pypi_name} Version: 1.3.0 Release: %autorelease Summary: Folds captured output sections in Travis CI build log License: MIT URL: https://github.com/abusalimov/pytest-travis-fold Source: %URL/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(py) %global common_description %{expand: Pytest plugin that folds captured output sections in Travis CI build log.} %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name_with_underscore} %check %pytest -k 'not test_travis_fixture_registered' %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst %license LICENSE %changelog %autochangelog