%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name sphinxcontrib-blockdiag Name: python-%{pypi_name} Version: 1.5.5 Release: 1%{?dist} Summary: Sphinx "blockdiag" extension License: BSD URL: https://github.com/blockdiag/sphinxcontrib-blockdiag Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description A sphinx extension for embedding block diagram using blockdiag_. %package -n python2-%{pypi_name} Summary: Sphinx "blockdiag" extension %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-sphinx >= 0.6 Requires: python-blockdiag >= 1.5.0 Requires: python-sphinx >= 0.6 %description -n python2-%{pypi_name} A sphinx extension for embedding block diagram using blockdiag_. %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: Sphinx "blockdiag" extension %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-setuptools BuildRequires: python3-devel Requires: python3-blockdiag >= 1.5.0 Requires: python3-sphinx >= 0.6 %description -n python3-%{pypi_name} A sphinx extension for embedding block diagram using blockdiag_. %endif %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitelib}/sphinxcontrib %{python2_sitelib}/sphinxcontrib_blockdiag-*.egg-info %{python2_sitelib}/sphinxcontrib_blockdiag-*.pth %exclude %{python2_sitelib}/sphinxcontrib/tests %if 0%{?with_python3} %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/sphinxcontrib %{python3_sitelib}/sphinxcontrib_blockdiag-*.egg-info %{python3_sitelib}/sphinxcontrib_blockdiag-*.pth %exclude %{python3_sitelib}/sphinxcontrib/tests %endif %changelog * Tue Sep 20 2016 Javier Peña - 1.5.5-1 - Initial package.