%if ! (0%{?rhel} >= 6 || 0%{?fedora}) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %global upstream_name sphinxcontrib-httpdomain Name: python-%{upstream_name} Version: 1.1.8 Release: 6%{?dist} Summary: Sphinx domain for documenting HTTP APIs License: BSD URL: http://packages.python.org/sphinxcontrib-httpdomain/ Source0: http://pypi.python.org/packages/source/s/%{upstream_name}/%{upstream_name}-%{version}.tar.gz %if ! (0%{?rhel} >= 7 || 0%{?fedora}) Patch0: %{name}-old-python.patch %endif BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if ! (0%{?rhel} >= 6 || 0%{?fedora}) Group: Development/Libraries BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %endif %if 0%{?rhel} > 0 && 0%{?rhel} <= 6 # This extension does not work with Sphinx 0.6 as shipped in RHEL6, # only with Sphinx 1.0 in EPEL. Requires: python-sphinx10 %else Requires: python-sphinx %endif %description Using this Sphinx domain you can document your HTTP API. It includes support for generating documentation from Flask routing tables. %if ! (0%{?rhel} >= 6 || 0%{?fedora}) %clean rm -rf %{buildroot} %endif %prep %setup -q -n %{upstream_name}-%{version} rm -r *.egg-info %if ! (0%{?rhel} >= 7 || 0%{?fedora}) %patch0 -p1 %endif %build %{__python} setup.py build %install %if ! (0%{?rhel} >= 6 || 0%{?fedora}) rm -rf %{buildroot} %endif %{__python} setup.py install --skip-build --root %{buildroot} %files %doc README.rst LICENSE %{python_sitelib}/* %changelog * Sat Jun 07 2014 Fedora Release Engineering - 1.1.8-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue Feb 11 2014 Dan Callaghan - 1.1.8-5 - really fix sphinx requirement * Mon Feb 10 2014 Pádraig Brady - 1.1.8-4 - fix sphinx requirement on RHEL 7 * Wed Oct 09 2013 Dan Callaghan - 1.1.8-3 - require python-sphinx10 on EPEL * Sun Aug 04 2013 Fedora Release Engineering - 1.1.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon Apr 22 2013 Dan Callaghan - 1.1.8-1 - new upstream release 1.1.8 - require python-sphinx (except on EPEL5/6) * Mon Mar 04 2013 Dan Callaghan - 1.1.7-2 - support EPEL5 and EPEL6 * Mon Feb 11 2013 Dan Callaghan - 1.1.7-1 - initial version