From 7e13028ca0af331d2de40a614ffa2ba1a4fb64ec Mon Sep 17 00:00:00 2001 From: Julian Taylor Date: Sat, 1 Jun 2013 18:12:28 +0200 Subject: [PATCH] update packaging to use dh_sphinxdoc and dh_python2 requires search-html.patch to fix file so dh_sphinxdoc recognises it --- debian/changelog | 4 +++- debian/control | 12 ++++-------- debian/patches/search-html.patch | 21 +++++++++++++++++++++ debian/patches/series | 1 + debian/python-skimage-doc.lintian-overrides | 4 ---- debian/rules | 8 +------- 6 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 debian/patches/search-html.patch delete mode 100644 debian/python-skimage-doc.lintian-overrides diff --git a/debian/changelog b/debian/changelog index 59b6416d..511e377d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ skimage (0.8.2-2) UNRELEASED; urgency=low * add autopkgtests + * update packaging to use dh_sphinxdoc and dh_python2 + requires search-html.patch to fix file so dh_sphinxdoc recognises it - -- Julian Taylor Mon, 10 Jun 2013 21:15:36 +0200 + -- Julian Taylor Mon, 10 Jun 2013 21:16:55 +0200 skimage (0.8.2-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 5ad3d2db..37f2ac63 100644 --- a/debian/control +++ b/debian/control @@ -7,15 +7,14 @@ Build-Depends: debhelper (>= 7.0.50), python-all-dev (>= 2.6.6-3~), python-setuptools, python-numpy, python-scipy (>= 0.10), - python-sphinx, + python-sphinx (>= 1.0.7+dfsg-1~), python-nose, cython (>= 0.15), python-matplotlib (>= 1.0), libfreeimage3, - python-imaging, - python-support + python-imaging Standards-Version: 3.9.4 -XS-Python-Version: >= 2.6 +X-Python-Version: >= 2.6 Homepage: http://scikits-image.org Vcs-Browser: https://github.com/scikits-image/scikits-image Vcs-Git: git://github.com/scikits-image/scikits-image.git @@ -28,7 +27,6 @@ Depends: ${misc:Depends}, ${python:Depends}, python-scipy (>= 0.10), python-skimage-lib (>= ${source:Version}), libfreeimage3, -Provides: ${python:Provides} Recommends: python-nose, python-matplotlib (>= 1.0), python-imaging, python-qt4 Suggests: python-skimage-doc, python-opencv Description: Python modules for image processing @@ -39,7 +37,7 @@ Description: Python modules for image processing Package: python-skimage-doc Architecture: all Section: doc -Depends: ${misc:Depends}, libjs-jquery +Depends: ${misc:Depends}, ${sphinxdoc:Depends} Suggests: python-skimage Description: Documentation and examples for scikits-image This package contains documentation and example scripts for @@ -49,8 +47,6 @@ Package: python-skimage-lib Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, python-numpy Recommends: python-skimage -Provides: ${python:Provides} -XB-Python-Version: ${python:Versions} Description: Optimized low-level algorithms for scikits-image This is an add-on package for python-skimage. It provides optimized, low-level implementations of algorithms. diff --git a/debian/patches/search-html.patch b/debian/patches/search-html.patch new file mode 100644 index 00000000..25945b41 --- /dev/null +++ b/debian/patches/search-html.patch @@ -0,0 +1,21 @@ +Description: change to ajax load of searchindex + required so dh_sphinx recognises it as a search.html +--- a/doc/source/themes/scikit-image/search.html ++++ b/doc/source/themes/scikit-image/search.html +@@ -10,7 +10,15 @@ + {% extends "layout.html" %} + {% set title = _('Search') %} + {% set script_files = script_files + ['_static/searchtools.js'] %} +-{% set script_files = script_files + ['searchindex.js'] %} ++{% block extrahead %} ++ ++ {# this is used when loading the search index using $.ajax fails, ++ such as on Chrome for documents on localhost #} ++ ++ {{ super() }} ++{% endblock %} + {% block body %} +

{{ _('Search') }}

+
diff --git a/debian/patches/series b/debian/patches/series index eefc860f..2d620e1c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ changeset_0eea2a48fe2dca7bbb3681fcd5b511579cad6347.diff up_correct_version +search-html.patch \ No newline at end of file diff --git a/debian/python-skimage-doc.lintian-overrides b/debian/python-skimage-doc.lintian-overrides deleted file mode 100644 index 221aff71..00000000 --- a/debian/python-skimage-doc.lintian-overrides +++ /dev/null @@ -1,4 +0,0 @@ -# For easy backportability just rely on the shipped copy of underscore.js for now until problems with nodejs get resolved -# - -python-skimage-doc binary: embedded-javascript-library usr/share/doc/python-skimage-doc/html/_static/underscore.js diff --git a/debian/rules b/debian/rules index abece951..b7beac2f 100755 --- a/debian/rules +++ b/debian/rules @@ -12,7 +12,7 @@ export HOME=$(CURDIR)/build # Mega rule %: - dh $@ --buildsystem python_distutils + dh $@ --with python2,sphinxdoc --buildsystem python_distutils override_dh_clean: ifeq (,$(filter noclean,$(DEB_BUILD_OPTIONS))) @@ -38,12 +38,6 @@ ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) export PYTHONPATH=$(PACKAGE_ROOT_DIR)/usr/lib/python$*/dist-packages; \ cd doc; test -d build/html || $(MAKE) html python$* setup.py install --install-layout=deb --root=$(PACKAGE_ROOT_DIR) - : # Use jquery and underscore from Debian package, so prune shipped one - -rm -f doc/build/html/_static/jquery.js - # Actually due to the problems with underscore pkg across releases just ship one for now - #-rm -f doc/build/html/_static/underscore.js - -rm -rf doc/build/html/_sources - -rm -f doc/build/html/.buildinfo endif ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))