python-sphinxcontrib-httpdo.../python-sphinxcontrib-httpdomain.spec

72 lines
2.1 KiB
RPMSpec
Raw Normal View History

2013-03-04 03:32:01 +00:00
%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
2013-02-11 05:03:22 +00:00
%global upstream_name sphinxcontrib-httpdomain
Name: python-%{upstream_name}
2013-04-22 01:27:37 +00:00
Version: 1.1.8
Release: 1%{?dist}
2013-02-11 05:03:22 +00:00
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
2013-03-04 03:32:01 +00:00
%if ! (0%{?rhel} >= 7 || 0%{?fedora})
Patch0: %{name}-old-python.patch
%endif
2013-02-11 05:03:22 +00:00
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
2013-03-04 03:32:01 +00:00
%if ! (0%{?rhel} >= 6 || 0%{?fedora})
Group: Development/Libraries
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%endif
2013-02-11 05:03:22 +00:00
2013-04-22 01:27:37 +00:00
# This package is not usable without Sphinx, but EPEL5 and EPEL6 have
# both python-sphinx and python-sphinx10, and we don't want to require one or
# the other in particular.
%if 0%{?fedora}
Requires: python-sphinx
%endif
2013-02-11 05:03:22 +00:00
%description
Using this Sphinx domain you can document your HTTP API. It includes support
for generating documentation from Flask routing tables.
2013-03-04 03:32:01 +00:00
%if ! (0%{?rhel} >= 6 || 0%{?fedora})
%clean
rm -rf %{buildroot}
%endif
2013-02-11 05:03:22 +00:00
%prep
%setup -q -n %{upstream_name}-%{version}
2013-04-22 01:27:37 +00:00
rm -r *.egg-info
2013-03-04 03:32:01 +00:00
%if ! (0%{?rhel} >= 7 || 0%{?fedora})
%patch0 -p1
%endif
2013-02-11 05:03:22 +00:00
%build
%{__python} setup.py build
%install
2013-03-04 03:32:01 +00:00
%if ! (0%{?rhel} >= 6 || 0%{?fedora})
rm -rf %{buildroot}
%endif
2013-02-11 05:03:22 +00:00
%{__python} setup.py install --skip-build --root %{buildroot}
%files
2013-04-22 01:27:37 +00:00
%doc README.rst LICENSE
2013-02-11 05:03:22 +00:00
%{python_sitelib}/*
%changelog
2013-04-22 01:27:37 +00:00
* Mon Apr 22 2013 Dan Callaghan <dcallagh@redhat.com> - 1.1.8-1
- new upstream release 1.1.8
- require python-sphinx (except on EPEL5/6)
2013-03-04 03:32:01 +00:00
* Mon Mar 04 2013 Dan Callaghan <dcallagh@redhat.com> - 1.1.7-2
- support EPEL5 and EPEL6
2013-02-11 05:03:22 +00:00
* Mon Feb 11 2013 Dan Callaghan <dcallagh@redhat.com> - 1.1.7-1
- initial version