forked from pool/python-sphinxcontrib-httpdomain
Accepting request 697213 from home:mcalabkova:branches:devel:languages:python
- update to version 1.7.0
* Implemented :autoquickref: option that use available
informations to build a quickref.
* Remove references to the sphinx.util.compat module which was
deprecated in Sphinx 1.6 and removed in 1.7.
* Made :mod:`sphinxcontrib.autohttp.tornado` compatible with
Tornado 4.5 and newer.
* Minimum compatible version of Sphinx became changed to 1.5.
* Use HTTPS for :rfc: generated links.
- Dropped obsolete patch newer-sphinx.patch
- Take upstream release tarball because of tests
OBS-URL: https://build.opensuse.org/request/show/697213
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-httpdomain?expand=0&rev=25
This commit is contained in:
committed by
Git OBS Bridge
parent
53ea581930
commit
0050138d97
3
1.7.0.tar.gz
Normal file
3
1.7.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d957adcf912268555048c1b14f17e4d35a0b1f3cd48d1471822af9d7c2533afd
|
||||
size 37493
|
||||
@@ -1,206 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Dave Shawley <daveshawley@gmail.com>
|
||||
# Date 1498216338 14400
|
||||
# Fri Jun 23 07:12:18 2017 -0400
|
||||
# Branch new-sphinx
|
||||
# Node ID ac9095c543a4c5ffba77da14ca21aaa155725418
|
||||
# Parent e758073384efd1ed5ed1e6286301b7bef71b27cf
|
||||
Update 'http' domain detection to work with new Sphinx.
|
||||
|
||||
The autohttp.*.setup functions were detecting whether httpdomain was
|
||||
installed using an attribute on the sphinx application that was removed
|
||||
in recent Sphinx versions. This commit:
|
||||
|
||||
(1) moves the idempotency logic into httpdomain.setup
|
||||
(2) makes the logic work with new and old versions of sphinx by
|
||||
falling back to the legacy behavior on AttributeError
|
||||
(3) changes each setup function to always call the new idempotent
|
||||
httpdomain.setup
|
||||
|
||||
diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/bottle.py
|
||||
--- a/sphinxcontrib/autohttp/bottle.py Fri Mar 31 17:37:43 2017 +0000
|
||||
+++ b/sphinxcontrib/autohttp/bottle.py Fri Jun 23 07:12:18 2017 -0400
|
||||
@@ -108,7 +108,6 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- if 'http' not in app.domains:
|
||||
- httpdomain.setup(app)
|
||||
+ httpdomain.setup(app)
|
||||
app.add_directive('autobottle', AutobottleDirective)
|
||||
|
||||
diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/flask.py
|
||||
--- a/sphinxcontrib/autohttp/flask.py Fri Mar 31 17:37:43 2017 +0000
|
||||
+++ b/sphinxcontrib/autohttp/flask.py Fri Jun 23 07:12:18 2017 -0400
|
||||
@@ -43,6 +43,5 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- if 'http' not in app.domains:
|
||||
- httpdomain.setup(app)
|
||||
+ httpdomain.setup(app)
|
||||
app.add_directive('autoflask', AutoflaskDirective)
|
||||
diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/flaskqref.py
|
||||
--- a/sphinxcontrib/autohttp/flaskqref.py Fri Mar 31 17:37:43 2017 +0000
|
||||
+++ b/sphinxcontrib/autohttp/flaskqref.py Fri Jun 23 07:12:18 2017 -0400
|
||||
@@ -2,7 +2,7 @@
|
||||
sphinxcontrib.autohttp.flaskqref
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- The sphinx.ext.autodoc-style HTTP API quick reference
|
||||
+ The sphinx.ext.autodoc-style HTTP API quick reference
|
||||
builder (from Flask)
|
||||
for sphinxcontrib.httpdomain.
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
node.document = self.state.document
|
||||
result = ViewList()
|
||||
for line in QuickReferenceFlaskDirective.header:
|
||||
- result.append(line, '<qrefflask>')
|
||||
+ result.append(line, '<qrefflask>')
|
||||
table={}
|
||||
table_sorted_names=[]
|
||||
-
|
||||
+
|
||||
for table_row in self.make_rst(qref=True):
|
||||
name = table_row['name']
|
||||
if table.get(name) is None:
|
||||
table[name]=[]
|
||||
- table[name].append(table_row)
|
||||
+ table[name].append(table_row)
|
||||
if name not in table_sorted_names:
|
||||
table_sorted_names.append(name)
|
||||
|
||||
@@ -72,9 +72,8 @@
|
||||
result.append('', '<qrefflask>')
|
||||
nested_parse_with_titles(self.state, result, node)
|
||||
return node.children
|
||||
-
|
||||
+
|
||||
def setup(app):
|
||||
- if 'http' not in app.domains:
|
||||
- httpdomain.setup(app)
|
||||
+ httpdomain.setup(app)
|
||||
app.add_directive('qrefflask', QuickReferenceFlaskDirective)
|
||||
|
||||
diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/tornado.py
|
||||
--- a/sphinxcontrib/autohttp/tornado.py Fri Mar 31 17:37:43 2017 +0000
|
||||
+++ b/sphinxcontrib/autohttp/tornado.py Fri Jun 23 07:12:18 2017 -0400
|
||||
@@ -123,6 +123,5 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- if 'http' not in app.domains:
|
||||
- httpdomain.setup(app)
|
||||
+ httpdomain.setup(app)
|
||||
app.add_directive('autotornado', AutoTornadoDirective)
|
||||
diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/httpdomain.py
|
||||
--- a/sphinxcontrib/httpdomain.py Fri Mar 31 17:37:43 2017 +0000
|
||||
+++ b/sphinxcontrib/httpdomain.py Fri Jun 23 07:12:18 2017 -0400
|
||||
@@ -756,7 +756,13 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- app.add_domain(HTTPDomain)
|
||||
+ try:
|
||||
+ if app.registry.has_domain(HTTPDomain.name):
|
||||
+ return
|
||||
+ except AttributeError:
|
||||
+ if HTTPDomain.name in app.domains:
|
||||
+ return
|
||||
+
|
||||
try:
|
||||
get_lexer_by_name('http')
|
||||
except ClassNotFound:
|
||||
# HG changeset patch
|
||||
# User Dave Shawley <daveshawley@gmail.com>
|
||||
# Date 1498564881 14400
|
||||
# Tue Jun 27 08:01:21 2017 -0400
|
||||
# Branch new-sphinx
|
||||
# Node ID 158f6d8b018b3d148d389df8abb0485d665907f4
|
||||
# Parent ac9095c543a4c5ffba77da14ca21aaa155725418
|
||||
httpdomain: Add missing call to add_domain.
|
||||
|
||||
diff -r ac9095c543a4 -r 158f6d8b018b httpdomain/sphinxcontrib/httpdomain.py
|
||||
--- a/sphinxcontrib/httpdomain.py Fri Jun 23 07:12:18 2017 -0400
|
||||
+++ b/sphinxcontrib/httpdomain.py Tue Jun 27 08:01:21 2017 -0400
|
||||
@@ -763,6 +763,8 @@
|
||||
if HTTPDomain.name in app.domains:
|
||||
return
|
||||
|
||||
+ app.add_domain(HTTPDomain)
|
||||
+
|
||||
try:
|
||||
get_lexer_by_name('http')
|
||||
except ClassNotFound:
|
||||
# HG changeset patch
|
||||
# User Dave Shawley <daveshawley@gmail.com>
|
||||
# Date 1498565517 14400
|
||||
# Tue Jun 27 08:11:57 2017 -0400
|
||||
# Branch new-sphinx
|
||||
# Node ID ec67ec284a091ae31856c65a63004e21af26e6f3
|
||||
# Parent 158f6d8b018b3d148d389df8abb0485d665907f4
|
||||
httpdomain/autohttp: Use app.setup_extension.
|
||||
|
||||
This method has been available since sphinx 1.0 so there is no need to wrap
|
||||
this in "version safety" checks and it is significantly cleaner.
|
||||
|
||||
diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/bottle.py
|
||||
--- a/sphinxcontrib/autohttp/bottle.py Tue Jun 27 08:01:21 2017 -0400
|
||||
+++ b/sphinxcontrib/autohttp/bottle.py Tue Jun 27 08:11:57 2017 -0400
|
||||
@@ -108,6 +108,5 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- httpdomain.setup(app)
|
||||
+ app.setup_extension('sphinxcontrib.httpdomain')
|
||||
app.add_directive('autobottle', AutobottleDirective)
|
||||
-
|
||||
diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/flask.py
|
||||
--- a/sphinxcontrib/autohttp/flask.py Tue Jun 27 08:01:21 2017 -0400
|
||||
+++ b/sphinxcontrib/autohttp/flask.py Tue Jun 27 08:11:57 2017 -0400
|
||||
@@ -43,5 +43,5 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- httpdomain.setup(app)
|
||||
+ app.setup_extension('sphinxcontrib.httpdomain')
|
||||
app.add_directive('autoflask', AutoflaskDirective)
|
||||
diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/flaskqref.py
|
||||
--- a/sphinxcontrib/autohttp/flaskqref.py Tue Jun 27 08:01:21 2017 -0400
|
||||
+++ b/sphinxcontrib/autohttp/flaskqref.py Tue Jun 27 08:11:57 2017 -0400
|
||||
@@ -74,6 +74,5 @@
|
||||
return node.children
|
||||
|
||||
def setup(app):
|
||||
- httpdomain.setup(app)
|
||||
+ app.setup_extension('sphinxcontrib.httpdomain')
|
||||
app.add_directive('qrefflask', QuickReferenceFlaskDirective)
|
||||
-
|
||||
diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/tornado.py
|
||||
--- a/sphinxcontrib/autohttp/tornado.py Tue Jun 27 08:01:21 2017 -0400
|
||||
+++ b/sphinxcontrib/autohttp/tornado.py Tue Jun 27 08:11:57 2017 -0400
|
||||
@@ -123,5 +123,5 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- httpdomain.setup(app)
|
||||
+ app.setup_extension('sphinxcontrib.httpdomain')
|
||||
app.add_directive('autotornado', AutoTornadoDirective)
|
||||
diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/httpdomain.py
|
||||
--- a/sphinxcontrib/httpdomain.py Tue Jun 27 08:01:21 2017 -0400
|
||||
+++ b/sphinxcontrib/httpdomain.py Tue Jun 27 08:11:57 2017 -0400
|
||||
@@ -756,13 +756,6 @@
|
||||
|
||||
|
||||
def setup(app):
|
||||
- try:
|
||||
- if app.registry.has_domain(HTTPDomain.name):
|
||||
- return
|
||||
- except AttributeError:
|
||||
- if HTTPDomain.name in app.domains:
|
||||
- return
|
||||
-
|
||||
app.add_domain(HTTPDomain)
|
||||
|
||||
try:
|
||||
@@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 23 14:52:51 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- update to version 1.7.0
|
||||
* Implemented :autoquickref: option that use available
|
||||
informations to build a quickref.
|
||||
* Remove references to the sphinx.util.compat module which was
|
||||
deprecated in Sphinx 1.6 and removed in 1.7.
|
||||
* Made :mod:`sphinxcontrib.autohttp.tornado` compatible with
|
||||
Tornado 4.5 and newer.
|
||||
* Minimum compatible version of Sphinx became changed to 1.5.
|
||||
* Use HTTPS for :rfc: generated links.
|
||||
- Dropped obsolete patch newer-sphinx.patch
|
||||
- Take upstream release tarball because of tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 10 12:19:24 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-sphinxcontrib-httpdomain
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,26 +17,30 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_with test
|
||||
%bcond_without test
|
||||
Name: python-sphinxcontrib-httpdomain
|
||||
Version: 1.5.0
|
||||
Version: 1.7.0
|
||||
Release: 0
|
||||
Summary: Sphinx domain for HTTP APIs
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: http://bitbucket.org/birkenfeld/sphinx-contrib
|
||||
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-httpdomain/sphinxcontrib-httpdomain-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM newer-sphinx.patch -- https://bitbucket.org/birkenfeld/sphinx-contrib/pull-requests/152/fix-182-by-moving-around-initialization/diff
|
||||
Patch1: newer-sphinx.patch
|
||||
Source: https://github.com/sphinx-contrib/httpdomain/archive/%{version}.tar.gz
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Sphinx
|
||||
Requires: python-Sphinx >= 1.5
|
||||
Requires: python-six
|
||||
Requires: python-tornado >= 4.5
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module Flask >= 0.11}
|
||||
BuildRequires: %{python_module Sphinx >= 1.5}
|
||||
BuildRequires: %{python_module bottle >= 0.11.0}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: %{python_module tornado >= 4.5}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
@@ -49,8 +53,7 @@ You can find the documentation from the following URL:
|
||||
http://packages.python.org/sphinxcontrib-httpdomain/
|
||||
|
||||
%prep
|
||||
%setup -q -n sphinxcontrib-httpdomain-%{version}
|
||||
%patch1 -p1
|
||||
%setup -q -n httpdomain-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -59,6 +62,12 @@ http://packages.python.org/sphinxcontrib-httpdomain/
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
PYTHONPATH=.
|
||||
%python_exec -m pytest test
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eab097505caee272ca6a313edb2cbc3d2103bb6bcc09923ef43054e238452f6b
|
||||
size 13981
|
||||
Reference in New Issue
Block a user