Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34b8592

Browse files
committed
RF: simply do not build sphinx documentation on systems with older sphinx
backporting of recent sphinx release is a bit tedious.
1 parent 43005e7 commit 34b8592

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ scikit-learn (0.14-1) unstable; urgency=low
1010
- dropped swig (not needed since awhile)
1111
- moved sphinx, PIL, and graphviz to Build-Depends-Indep since
1212
needed only for -doc package
13-
- require sphinx 1.1.3 due to problems with unicode in earlier
14-
present on older Debian/Ubuntu's versions
13+
- do not build documentation when sphinx < 1.1.3 due to problems
14+
with unicode in earlier present on older Debian/Ubuntu's versions
1515
- boosted policy to 3.9.4 (no further changes)
1616
- migrate from python-support to dh_python2
1717

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 7.0.50),
1313
python-matplotlib,
1414
python-joblib (>= 0.4.5), python-support
1515
Build-Depends-Indep:
16-
python-sphinx (>= 1.1.3~), python-imaging, graphviz,
16+
python-sphinx (>= 1.0), python-imaging, graphviz,
1717
Standards-Version: 3.9.4
1818
XS-Python-Version: >= 2.6
1919
Homepage: http://scikit-learn.sourceforge.net

debian/rules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ PACKAGE_ROOT_DIR = debian/${PACKAGE_NAME}
77
PYVERS = $(shell pyversions -vr)
88
PYVER = $(shell pyversions -vd)
99

10+
SPHINX_VER := $(shell python -c 'from sphinx import __version__; print __version__')
11+
NODOC = $(shell dpkg --compare-versions $(SPHINX_VER) lt 10.1.3 && echo "nodoc" || echo "")
12+
export DEB_BUILD_OPTIONS += $(NODOC)
13+
1014
# Some tests are known to fail randomly so need to be excluded ATM
1115
NOSEARGS :=
1216
# --exclude='test_(sparse_svc_clone_with_callable_kernel|spectral_clustering_sparse|ovr_fit_predict)'
@@ -56,6 +60,9 @@ else
5660
export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
5761
cd doc; $(MAKE) html
5862
endif
63+
else
64+
mkdir -p doc/_build/html
65+
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
5966
endif
6067
: # Use jquery from Debian package, so prune shipped one
6168
-rm doc/_build/html/_static/jquery.js

0 commit comments

Comments
 (0)