%global pypi_name smartypants Name: python-%{pypi_name} Version: 2.0.1 Release: 1%{?dist} Summary: Python with the SmartyPants License: BSD License URL: https://github.com/leohemsted/smartypants.py Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}.py-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(sphinx) %description smartypants is a Python fork of SmartyPants %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(setuptools) %description -n python3-%{pypi_name} smartypants is a Python fork of SmartyPants %package -n python-%{pypi_name}-doc Summary: smartypants documentation %description -n python-%{pypi_name}-doc Documentation for smartypants %prep %autosetup -n %{pypi_name}.py-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build # generate html documentation cd docs make html # remove the sphinx-build leftovers rm -rf _build/html/.{doctrees,buildinfo} %install %py3_install %files -n python3-%{pypi_name} %doc README.rst %doc CHANGES.rst %license COPYING %{_bindir}/smartypants %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python-%{pypi_name}-doc %doc docs/_build/html %license COPYING %changelog * Sat Sep 1 2018 José Matos - 2.0.1-1 - initial package.