diff --git a/debian/changelog b/debian/changelog index 88e25f7b513f8155bb4a5379f30d9a958e643d08..f9ef4d776fef083b79bfe57c93d3883227f98d63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,8 @@ scikit-learn (0.14-1) unstable; urgency=low - dropped swig (not needed since awhile) - moved sphinx, PIL, and graphviz to Build-Depends-Indep since needed only for -doc package - - require sphinx 1.1.3 due to problems with unicode in earlier - present on older Debian/Ubuntu's versions + - do not build documentation when sphinx < 1.1.3 due to problems + with unicode in earlier present on older Debian/Ubuntu's versions - boosted policy to 3.9.4 (no further changes) - migrate from python-support to dh_python2 diff --git a/debian/control b/debian/control index 0a3453c5afea57ab9e6bf4ba7b8693600eb7f55e..16ed7d280077995b73398933600deb32c91f7ae3 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 7.0.50), python-matplotlib, python-joblib (>= 0.4.5), python-support Build-Depends-Indep: - python-sphinx (>= 1.1.3~), python-imaging, graphviz, + python-sphinx (>= 1.0), python-imaging, graphviz, Standards-Version: 3.9.4 XS-Python-Version: >= 2.6 Homepage: http://scikit-learn.sourceforge.net diff --git a/debian/rules b/debian/rules index c769cfff14d1bd53ec83bf42e0c4225603b3f4eb..eacf75a5ddaee787f601ade067176e5c76e6f6a4 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,10 @@ PACKAGE_ROOT_DIR = debian/${PACKAGE_NAME} PYVERS = $(shell pyversions -vr) PYVER = $(shell pyversions -vd) +SPHINX_VER := $(shell python -c 'from sphinx import __version__; print __version__') +NODOC = $(shell dpkg --compare-versions $(SPHINX_VER) lt 10.1.3 && echo "nodoc" || echo "") +export DEB_BUILD_OPTIONS += $(NODOC) + # Some tests are known to fail randomly so need to be excluded ATM NOSEARGS := # --exclude='test_(sparse_svc_clone_with_callable_kernel|spectral_clustering_sparse|ovr_fit_predict)' @@ -56,6 +60,9 @@ else export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \ cd doc; $(MAKE) html endif +else + mkdir -p doc/_build/html + echo "<HTML><BODY><P>sklearn documentation was not built.<P>Please visit <A HREF='http://scikit-learn.org'>http://scikit-learn.org</A></BODY></HTML>" >| doc/_build/html/index.html endif : # Use jquery from Debian package, so prune shipped one -rm doc/_build/html/_static/jquery.js