%bcond_without check %global pypi_name aspy.yaml Name: python-%{pypi_name} Version: 1.3.0 Release: 4%{?dist} Summary: Few extensions to pyyaml License: MIT URL: https://github.com/asottile/aspy.yaml Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %if %{with check} BuildRequires: python3dist(pyyaml) BuildRequires: python3-pytest %endif %?python_enable_dependency_generator %description A few extensions to pyyaml. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{summary}. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build %install %py3_install %if %{with check} %check %{python3} -m pytest -v %endif %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitelib}/aspy/ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ %changelog * Thu Oct 24 2019 Artem Polishchuk - 1.3.0-4 - Initial package