Package: python-falcon Version: 0.3.0-5 Severity: normal Dear Maintainer,
I found that python-falcon does not build or package its documentation. So I attach patches to build and package the sphinx documentation in a new python-falcon-doc package. Additionally, I have added autopkgtests that run the test suite, and fix a lintian warning about a missing manpage. Cheers, Kevin P.S. Apologies if this is submitted twice, I've been having issues with reportbug. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (900, 'testing'), (500, 'testing-updates'), (500, 'stable-updates'), (400, 'unstable'), (300, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages python-falcon depends on: ii libc6 2.21-9 ii python 2.7.11-1 ii python-mimeparse 0.1.4-1 ii python-six 1.10.0-2 pn python:any <none> python-falcon recommends no packages. python-falcon suggests no packages. -- no debconf information --- Kevin Murray 0xA4B4EE6A
>From 990ed5fd996290c31f2a06491d8d5966ca10e31d Mon Sep 17 00:00:00 2001 From: Kevin Murray <s...@kdmurray.id.au> Date: Mon, 22 Feb 2016 07:48:39 +1100 Subject: [PATCH 1/5] Build sphinx docs; package into python-falcon-do --- debian/control | 36 ++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/patches/sphinx-13+-napoleon | 16 ++++++++++++++++ debian/python-falcon-doc.doc-base | 9 +++++++++ debian/python-falcon-doc.install | 1 + debian/rules | 6 +++++- 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 debian/patches/sphinx-13+-napoleon create mode 100644 debian/python-falcon-doc.doc-base create mode 100644 debian/python-falcon-doc.install diff --git a/debian/control b/debian/control index a39a082..e7480d0 100644 --- a/debian/control +++ b/debian/control @@ -29,6 +29,8 @@ Build-Depends: cython, python3-six, python3-testtools, python3-yaml, + python-sphinx, + python3-sphinx, Standards-Version: 3.9.6 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-falcon.git Vcs-Git: git://anonscm.debian.org/openstack/python-falcon.git @@ -42,6 +44,7 @@ Depends: python-mimeparse, ${python:Depends}, ${shlibs:Depends}, Recommends: ${python:Recommends}, +Suggests: python-falcon-doc ( = ${source:Version}) Description: supersonic micro-framework for building cloud APIs - Python 2.x Falcon is a high-performance Python framework for building cloud APIs. It encourages the REST architectural style, and tries to do as little as possible @@ -74,6 +77,7 @@ Depends: python3-mimeparse, ${python3:Depends}, ${shlibs:Depends}, Recommends: ${python3:Recommends}, +Suggests: python-falcon-doc ( = ${source:Version}) Description: supersonic micro-framework for building cloud APIs - Python 3.x Falcon is a high-performance Python framework for building cloud APIs. It encourages the REST architectural style, and tries to do as little as possible @@ -97,3 +101,35 @@ Description: supersonic micro-framework for building cloud APIs - Python 3.x * Python 2.6, Python 2.7, PyPy and Python 3.3 support . This package provides the Python 3.x module. + +Package: python-falcon-doc +Architecture: all +Section: doc +Depends: ${misc:Depends}, + ${shlibs:Depends}, + ${sphinxdoc:Depends}, +Recommends: python3-falcon ( = ${source:Version}) | python-falcon ( = ${source:Version}) +Description: supersonic micro-framework for building cloud APIs - Documentation + Falcon is a high-performance Python framework for building cloud APIs. It + encourages the REST architectural style, and tries to do as little as possible + while remaining highly effective. + . + Unlike other Python web frameworks, Falcon won't bottleneck your API's + performance under highly concurrent workloads. Many frameworks max out at + serving simple "hello world" requests at a few thousand req/sec, while Falcon + can easily serve many more on the same hardware. + . + Falcon isn't very opinionated. In other words, the framework leaves a lot of + decisions and implementation details to you. + . + Features: + * Intuitive routing via URI templates and resource classes + * Easy access to headers and bodies through request and response classes + * Idiomatic HTTP error responses via a handy exception base class + * DRY request processing using global, resource, and method hooks + * Snappy unit testing through WSGI helpers and mocks + * 20% speed boost when Cython is available + * Python 2.6, Python 2.7, PyPy and Python 3.3 support + . + This package provides the sphinx API documentation and user guide. + diff --git a/debian/patches/series b/debian/patches/series index e966e6e..a7fcee9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ fix-non-ascii-in-doc.patch fix-bad-case-compare-in-python3-tests.patch fixes-test_request_cookie_parsing.patch fix-spelling.patch +sphinx-13+-napoleon diff --git a/debian/patches/sphinx-13+-napoleon b/debian/patches/sphinx-13+-napoleon new file mode 100644 index 0000000..5348dc4 --- /dev/null +++ b/debian/patches/sphinx-13+-napoleon @@ -0,0 +1,16 @@ +Description: Use the new (post Sphinx 1.3) path to the napoleon extension +Author: Kevin Murray <s...@kdmurray.id.au> +Forwarded: no +Last-Update: 2016-02-21 + +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -38,7 +38,7 @@ + 'sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.viewcode', +- 'sphinxcontrib.napoleon', ++ 'sphinx.ext.napoleon', + ] + + # Add any paths that contain templates here, relative to this directory. diff --git a/debian/python-falcon-doc.doc-base b/debian/python-falcon-doc.doc-base new file mode 100644 index 0000000..f2c300a --- /dev/null +++ b/debian/python-falcon-doc.doc-base @@ -0,0 +1,9 @@ +Document: python-falcon +Title: Falcon API docs and user guide +Author: Falcon Authors +Abstract: API and user documentation for the falcon Python module +Section: Debian + +Format: HTML +Index: /usr/share/doc/python-falcon-doc/html/index.html +Files: /usr/share/doc/python-falcon-doc/html/*.html diff --git a/debian/python-falcon-doc.install b/debian/python-falcon-doc.install new file mode 100644 index 0000000..a81c7b0 --- /dev/null +++ b/debian/python-falcon-doc.install @@ -0,0 +1 @@ +doc/_build/html /usr/share/doc/python-falcon-doc diff --git a/debian/rules b/debian/rules index 94c78ef..a2a57c0 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,11 @@ UPSTREAM_GIT = git://github.com/racker/falcon.git include /usr/share/openstack-pkg-tools/pkgos.make %: - dh $@ --buildsystem=python_distutils --with python2,python3 + dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc + +override_dh_auto_build: + dh_auto_build + $(MAKE) -C doc html override_dh_auto_install: set -e ; for pyvers in $(PYTHONS); do \ -- 2.7.0
>From f1abc3610ec4447fa98d93f65200efd5efa9d7b4 Mon Sep 17 00:00:00 2001 From: Kevin Murray <s...@kdmurray.id.au> Date: Sat, 20 Feb 2016 13:00:45 -0800 Subject: [PATCH 2/5] Add autopkgtests --- debian/tests/control | 14 ++++++++++++++ debian/tests/runtests | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/runtests diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..cdfe5f1 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,14 @@ +Depends: python-nose, + python3-nose, + python-ddt, + python3-ddt, + python-requests, + python3-requests, + python-testtools, + python3-testtools, + python-yaml, + python3-yaml, + @ +Tests: runtests +# Test suite leaks warnings to stderr +Restrictions: allow-stderr diff --git a/debian/tests/runtests b/debian/tests/runtests new file mode 100644 index 0000000..6f46683 --- /dev/null +++ b/debian/tests/runtests @@ -0,0 +1,14 @@ +#!/bin/sh + + +TMP=$(mktemp -d) +trap "rm -rf $TMP" EXIT INT + +set -e + +cp -r tests $TMP + +cd $TMP + +nosetests +nosetests3 -- 2.7.0
>From 9597457c5602d84e3c0f8cad615bb61948e0ce50 Mon Sep 17 00:00:00 2001 From: Kevin Murray <s...@kdmurray.id.au> Date: Mon, 22 Feb 2016 07:48:48 +1100 Subject: [PATCH 4/5] Install benchmarking script to /usr/share/doc --- debian/rules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index a2a57c0..85b536b 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,11 @@ override_dh_auto_install: --root $(CURDIR)/debian/python3-falcon; \ done rm -rf $(CURDIR)/debian/python*-falcon/usr/lib/python*/dist-packages/tests - mv $(CURDIR)/debian/python3-falcon/usr/bin/falcon-bench $(CURDIR)/debian/python3-falcon/usr/bin/python3-falcon-bench + for py in python python3; do \ + mkdir -p $(CURDIR)/debian/$${py}-falcon/usr/share/doc/$${py}-falcon/ ;\ + mv $(CURDIR)/debian/$${py}-falcon/usr/bin/falcon-bench \ + $(CURDIR)/debian/$${py}-falcon/usr/share/doc/$${py}-falcon/falcon-bench.py ; \ + done override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) -- 2.7.0
>From 1f39edbd909e4690f5a500e7f9ab2d52458eae07 Mon Sep 17 00:00:00 2001 From: Kevin Murray <s...@kdmurray.id.au> Date: Sat, 20 Feb 2016 12:22:31 -0800 Subject: [PATCH 3/5] Use secure URLs --- debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index e7480d0..af7a9a5 100644 --- a/debian/control +++ b/debian/control @@ -32,9 +32,9 @@ Build-Depends: cython, python-sphinx, python3-sphinx, Standards-Version: 3.9.6 -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-falcon.git -Vcs-Git: git://anonscm.debian.org/openstack/python-falcon.git -Homepage: http://falconframework.org +Vcs-Browser: https://anonscm.debian.org/cgit/openstack/python-falcon.git +Vcs-Git: https://anonscm.debian.org/cgit/openstack/python-falcon.git +Homepage: https://falconframework.org Package: python-falcon Architecture: any -- 2.7.0
>From 92c893c46d8cc998667e88b88d2f059d69cc1a36 Mon Sep 17 00:00:00 2001 From: Kevin Murray <s...@kdmurray.id.au> Date: Sun, 21 Feb 2016 16:06:11 +1100 Subject: [PATCH 5/5] Bump changelog --- debian/changelog | 8 ++++++++ debian/control | 1 + 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index d691bcc..6ffdd8f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-falcon (0.3.0-6) UNRELEASED; urgency=medium + + * Build sphinx docs; package into python-falcon-doc + * Use secure VCS URLs + * Add autopkgtests + + -- Kevin Murray <s...@kdmurray.id.au> Sun, 21 Feb 2016 16:06:07 +1100 + python-falcon (0.3.0-5) unstable; urgency=medium * Added patch to fix test_request_cookie_parsing which fixes FTBFS diff --git a/debian/control b/debian/control index af7a9a5..acc42b4 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: python Priority: optional Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org> Uploaders: Thomas Goirand <z...@debian.org>, + Kevin Murray <s...@kdmurray.id.au>, Build-Depends: cython, cython3, debhelper (>= 9), -- 2.7.0