[Python-modules-commits] [flask-restful] 02/02: Build the documentation

Alexandre Viau reazem-guest at moszumanska.debian.org
Wed Aug 5 23:47:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

reazem-guest pushed a commit to branch master
in repository flask-restful.

commit 6534c36033f22a9430dbe238e385fe9ae247eab8
Author: aviau <alexandre at alexandreviau.net>
Date:   Wed Aug 5 13:40:41 2015 -0400

    Build the documentation
---
 debian/control                            | 17 ++++++++++++++++-
 debian/patches/dont-use-flask-theme.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 debian/python-flask-restful-doc.docs      |  1 +
 debian/python-flask-restful-doc.docs-base |  8 ++++++++
 debian/rules                              |  6 +++++-
 6 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 496b275..5dda909 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,10 @@ Build-Depends: debhelper (>= 9),
                dh-python,
                python-all,
                python-setuptools,
+               python-sphinx,
                python3-all,
-               python3-setuptools
+               python3-setuptools,
+               python3-sphinx,
 Build-Depends-Indep: python-nose,
                      python-pytest,
                      python-mock,
@@ -41,6 +43,7 @@ Depends: ${misc:Depends},
          python-six,
          python-tz,
          python3-crypto
+Suggests: python-flask-restful-doc
 Description: Python Flask extension for creating a great REST API
  Flask-RESTful lightweight abstraction that works with your existing
  ORM/libraries. Flask-RESTful encourages best practices with minimal setup. If
@@ -57,9 +60,21 @@ Depends: ${misc:Depends},
          python3-six,
          python3-tz,
          python3-crypto
+Suggests: python-flask-restful-doc
 Description: Python 3 Flask extension for creating a great REST API
  Flask-RESTful lightweight abstraction that works with your existing
  ORM/libraries. Flask-RESTful encourages best practices with minimal setup. If
  you are familiar with Flask, Flask-RESTful should be easy to pick up.
  .
  This is the Python 3 compatible package.
+
+Package: python-flask-restful-doc
+Section: doc
+Architecture: all
+Depends: ${sphinxdoc:Depends}, ${misc:Depends}
+Description: Flask extension for creating a great REST API - documentation
+ Flask-RESTful lightweight abstraction that works with your existing
+ ORM/libraries. Flask-RESTful encourages best practices with minimal setup. If
+ you are familiar with Flask, Flask-RESTful should be easy to pick up.
+ .
+ This is the documentation package
diff --git a/debian/patches/dont-use-flask-theme.patch b/debian/patches/dont-use-flask-theme.patch
new file mode 100644
index 0000000..6ebd463
--- /dev/null
+++ b/debian/patches/dont-use-flask-theme.patch
@@ -0,0 +1,27 @@
+Description: Don't use the flask html theme
+ Upstream tarball does not include the flask theme
+ so we have to build the docs without it
+Author: Alexandre Viau <alexandre at alexandreviau.net>
+Last-Update: 2015-08-05
+
+--- flask-restful-0.3.4.orig/docs/conf.py
++++ flask-restful-0.3.4/docs/conf.py
+@@ -97,14 +97,14 @@ pygments_style = 'sphinx'
+ # The theme to use for HTML and HTML Help pages.  See the documentation for
+ # a list of builtin themes.
+ html_theme_path = ['_themes']
+-html_theme = 'flask'
++#html_theme = 'flask'
+ 
+ # Theme options are theme-specific and customize the look and feel of a theme
+ # further.  For a list of options available for each theme, see the
+ # documentation.
+-html_theme_options = {
+-        'index_logo': 'flask-restful.png'
+-}
++#html_theme_options = {
++#        'index_logo': 'flask-restful.png'
++#}
+ 
+ # Add any paths that contain custom themes here, relative to this directory.
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a6f21c5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+dont-use-flask-theme.patch
diff --git a/debian/python-flask-restful-doc.docs b/debian/python-flask-restful-doc.docs
new file mode 100644
index 0000000..6d28621
--- /dev/null
+++ b/debian/python-flask-restful-doc.docs
@@ -0,0 +1 @@
+build/html
diff --git a/debian/python-flask-restful-doc.docs-base b/debian/python-flask-restful-doc.docs-base
new file mode 100644
index 0000000..4aac2e2
--- /dev/null
+++ b/debian/python-flask-restful-doc.docs-base
@@ -0,0 +1,8 @@
+Document: python-flask-restful-doc
+Title: Flask-RESTful Documentation
+Author: Kyle Conroy, Ryan Horn and Frank Stratton
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-flask-restful-doc/html/index.html
+Files: /usr/share/doc/python-flask-restful-doc/html/*
diff --git a/debian/rules b/debian/rules
index e5457a6..f46f152 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,4 +7,8 @@ export PYBUILD_TEST_PYTEST=1
 export PYBUILD_TEST_ARGS={dir} --verbose -p no:doctest
 
 %:
-	dh $@ --with python2,python3 --buildsystem=pybuild
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
+
+override_dh_auto_build:
+	dh_auto_build
+	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html # HTML generator

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/flask-restful.git



More information about the Python-modules-commits mailing list