--- cauldron/python-repoze-sphinx-autointerface/current/SPECS/python-repoze-sphinx-autointerface.spec 2017/05/24 10:48:47 1104368 +++ cauldron/python-repoze-sphinx-autointerface/current/SPECS/python-repoze-sphinx-autointerface.spec 2017/05/24 10:57:39 1104369 @@ -1,13 +1,10 @@ -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global with_py3 1 -%endif - %global pkgname repoze.sphinx.autointerface %global srcname %(tr . - <<< %{pkgname}) Name: python-%{srcname} Version: 0.8 -Release: 4%{?dist} +Release: %mkrel 1 +Group: Development/Python Summary: Auto-generate Sphinx API docs from Zope interfaces License: BSD @@ -16,16 +13,19 @@ BuildArch: noarch BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-sphinx +BuildRequires: python-setuptools +BuildRequires: python-sphinx BuildRequires: python-zope-interface -%if 0%{?with_py3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-sphinx BuildRequires: python3-zope-interface -%endif + +Requires: python-sphinx +Requires: python-zope-interface + +%{?python_provide:%python_provide python-%{srcname}} %global common_desc \ This package defines an extension for the Sphinx documentation system. \ @@ -35,18 +35,8 @@ %description %{common_desc} -%package -n python2-%{srcname} -Summary: Auto-generate Sphinx API docs from Zope interfaces -Requires: python2-sphinx -Requires: python-zope-interface - -%{?python_provide:%python_provide python2-%{srcname}} - -%description -n python2-%{srcname} -%{common_desc} - -%if 0%{?with_py3} %package -n python3-%{srcname} +Group: Development/Python Summary: Auto-generate Sphinx API docs from Zope interfaces Requires: python3-sphinx Requires: python3-zope-interface @@ -55,16 +45,14 @@ %description -n python3-%{srcname} %{common_desc} -%endif %prep %setup -q -c -%if 0%{?with_py3} cp -a %{pkgname}-%{version} python3-%{pkgname}-%{version} -%endif %build + # Python 2 build pushd %{pkgname}-%{version} %py2_build @@ -72,37 +60,32 @@ python2 %{_bindir}/rst2html --no-datestamp README.rst README.html popd -%if 0%{?with_py3} # Python 3 build pushd python3-%{pkgname}-%{version} %py3_build popd -%endif %install + # Python 2 install pushd %{pkgname}-%{version} %py2_install popd -%if 0%{?with_py3} # Python 3 install pushd python3-%{pkgname}-%{version} %py3_install popd -%endif -%files -n python2-%{srcname} +%files %doc %{pkgname}-%{version}/CHANGES.html %{pkgname}-%{version}/CONTRIBUTORS.txt %doc %{pkgname}-%{version}/README.html %license %{pkgname}-%{version}/COPYRIGHT.txt %{pkgname}-%{version}/LICENSE.txt %{python2_sitelib}/* -%if 0%{?with_py3} %files -n python3-%{srcname} %doc %{pkgname}-%{version}/CHANGES.html %{pkgname}-%{version}/CONTRIBUTORS.txt %doc %{pkgname}-%{version}/README.html %license %{pkgname}-%{version}/COPYRIGHT.txt %{pkgname}-%{version}/LICENSE.txt %{python3_sitelib}/* -%endif