%global pypi_name pygments_pytest %global dash_name pygments-pytest # this is BRed by pytest, so we need to run without tests when bootstrapping # also pygments-ansi-color is not available in Fedora yet %bcond_with tests Name: python-%{dash_name} Version: 1.2.0 Release: 1%{?dist} Summary: A pygments lexer for pytest output License: MIT URL: https://github.com/asottile/pygments-pytest Source0: %{url}/archive/v%{version}/%{dash_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{with tests} BuildRequires: python3-pygments BuildRequires: python3-pygments-ansi-color BuildRequires: python3-pytest %endif %description This library provides a pygments lexer called pytest. This library also provides a sphinx extension. %package -n python3-%{dash_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{dash_name} This library provides a pygments lexer called pytest. This library also provides a sphinx extension. %prep %autosetup -n %{dash_name}-%{version} %build %py3_build %install %py3_install %if %{with tests} %check %{__python3} -m pytest -v %endif %files -n python3-%{dash_name} %license LICENSE %doc README.md %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ %changelog * Tue Mar 12 2019 Miro HronĨok - 1.2.0-1 - Initial package