diff --git a/debian/changelog b/debian/changelog index 9308dbd98dc7428df372d955463009a426a253d1..c7d543411aa44ac83dc11c4036a8aaf41503c6c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ scikit-learn (0.14.1-1) unstable; urgency=low * The freshiest upstream release - addressed 'clean -a' issue, thus removing the dh_auto_clean override + * debian/rules + - if available cython >= 0.19 -- re-build Cythonized sources while + monitoring for changes using dh_autoreconf -- Yaroslav Halchenko <debian@onerussian.com> Thu, 08 Aug 2013 14:06:48 -0400 diff --git a/debian/control b/debian/control index 16ed7d280077995b73398933600deb32c91f7ae3..79772b29f44e03006820feb8344740d81cbbf2d5 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: python Priority: optional Maintainer: NeuroDebian Team <team@neuro.debian.net> Uploaders: Yaroslav Halchenko <debian@onerussian.com>, Michael Hanke <michael.hanke@gmail.com> -Build-Depends: debhelper (>= 7.0.50), +Build-Depends: debhelper (>= 7.0.50), dh-autoreconf, python-all-dev (>= 2.5), cython (>= 0.12~), python-setuptools, diff --git a/debian/rules b/debian/rules index 0818ec0b06f48342e6fb2d6287982fe38b10121a..ed72058651f5ebcbd71caafbec6f3ae0c0260dc3 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,9 @@ 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) +CYTHON_VER := $(shell dpkg -l cython 2>/dev/null | awk '/^ii/{print $$3;}' || echo 0) +RECONF = $(shell dpkg --compare-versions $(CYTHON_VER) ge 0.19 && echo ",autoreconf" || echo "") + # 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)' @@ -18,8 +21,15 @@ NOSEARGS := # Mega rule %: : # Explicit build system to avoid use of all-in-1 Makefile - dh $@ --buildsystem=python_distutils --with python2 + dh $@ --buildsystem=python_distutils --with python2$(RECONF) + +cythonize: + @echo "D: removing previously generated by Cython sources" + find -iname *.c | xargs grep -l 'Generated by Cython' | xargs rm + make cython +override_dh_autoreconf: + dh_autoreconf debian/rules -- cythonize override_dh_clean: rm -rf build doc/_build doc/auto_examples *-stamp *.egg-info sklearn/datasets/__config__.py