support EPEL5 and EPEL6
This commit is contained in:
parent
5649a4781f
commit
0453584acc
21
python-sphinxcontrib-httpdomain-old-python.patch
Normal file
21
python-sphinxcontrib-httpdomain-old-python.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff -ur sphinxcontrib-httpdomain-1.1.7.orig/sphinxcontrib/httpdomain.py sphinxcontrib-httpdomain-1.1.7/sphinxcontrib/httpdomain.py
|
||||||
|
--- sphinxcontrib-httpdomain-1.1.7.orig/sphinxcontrib/httpdomain.py 2012-03-28 16:10:58.000000000 +1000
|
||||||
|
+++ sphinxcontrib-httpdomain-1.1.7/sphinxcontrib/httpdomain.py 2013-03-04 13:20:09.941831182 +1000
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
location of the RFC which defines some HTTP method.
|
||||||
|
|
||||||
|
"""
|
||||||
|
- return '{}#{}{}'.format(self.base_url, self.anchor, self.section)
|
||||||
|
+ return '%s#%s%s' % (self.base_url, self.anchor, self.section)
|
||||||
|
|
||||||
|
|
||||||
|
#: The URL of the HTTP/1.1 RFC which defines the HTTP methods OPTIONS, GET,
|
||||||
|
@@ -319,7 +319,7 @@
|
||||||
|
for prefix in self.ignore:
|
||||||
|
if letters[:len(prefix)] == prefix:
|
||||||
|
return '/' + '/'.join(letters[:len(prefix) + 1])
|
||||||
|
- return '/%s' % (letters[0] if letters else '',)
|
||||||
|
+ return '/%s' % (letters and letters[0] or '',)
|
||||||
|
|
||||||
|
def generate(self, docnames=None):
|
||||||
|
content = {}
|
@ -1,27 +1,50 @@
|
|||||||
|
%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
|
%global upstream_name sphinxcontrib-httpdomain
|
||||||
|
|
||||||
Name: python-%{upstream_name}
|
Name: python-%{upstream_name}
|
||||||
Version: 1.1.7
|
Version: 1.1.7
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Sphinx domain for documenting HTTP APIs
|
Summary: Sphinx domain for documenting HTTP APIs
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://packages.python.org/sphinxcontrib-httpdomain/
|
URL: http://packages.python.org/sphinxcontrib-httpdomain/
|
||||||
Source0: http://pypi.python.org/packages/source/s/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
|
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
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
%if ! (0%{?rhel} >= 6 || 0%{?fedora})
|
||||||
|
Group: Development/Libraries
|
||||||
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Using this Sphinx domain you can document your HTTP API. It includes support
|
Using this Sphinx domain you can document your HTTP API. It includes support
|
||||||
for generating documentation from Flask routing tables.
|
for generating documentation from Flask routing tables.
|
||||||
|
|
||||||
|
%if ! (0%{?rhel} >= 6 || 0%{?fedora})
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{upstream_name}-%{version}
|
%setup -q -n %{upstream_name}-%{version}
|
||||||
|
%if ! (0%{?rhel} >= 7 || 0%{?fedora})
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if ! (0%{?rhel} >= 6 || 0%{?fedora})
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
%endif
|
||||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -29,5 +52,8 @@ for generating documentation from Flask routing tables.
|
|||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 04 2013 Dan Callaghan <dcallagh@redhat.com> - 1.1.7-2
|
||||||
|
- support EPEL5 and EPEL6
|
||||||
|
|
||||||
* Mon Feb 11 2013 Dan Callaghan <dcallagh@redhat.com> - 1.1.7-1
|
* Mon Feb 11 2013 Dan Callaghan <dcallagh@redhat.com> - 1.1.7-1
|
||||||
- initial version
|
- initial version
|
||||||
|
Loading…
Reference in New Issue
Block a user