8000 if available cython >= 0.19 -- re-build Cythonized sources while moni… · scikit-learn/scikit-learn@980a8a6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 980a8a6

Browse files
committed
if available cython >= 0.19 -- re-build Cythonized sources while monitoring for changes using dh_autoreconf
1 parent 264de0d commit 980a8a6

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

debian/changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ scikit-learn (0.14.1-1) unstable; urgency=low
22

33
* The freshiest upstream release
44
- addressed 'clean -a' issue, thus removing the dh_auto_clean override
5+
* debian/rules
6+
- if available cython >= 0.19 -- re-build Cythonized sources while
7+
monitoring for changes using dh_autoreconf
58

69
-- Yaroslav Halchenko <debian@onerussian.com> Thu, 08 Aug 2013 14:06:48 -0400
710

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: python
33
Priority: optional
44
Maintainer: NeuroDebian Team <team@neuro.debian.net>
55
Uploaders: Yaroslav Halchenko <debian@onerussian.com>, Michael Hanke <michael.hanke@gmail.com>
6-
Build-Depends: debhelper (>= 7.0.50),
6+
Build-Depends: debhelper (>= 7.0.50), dh-autoreconf,
77
python-all-dev (>= 2.5),
88
cython (>= 0.12~),
99
python-setuptools,

debian/rules

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,25 @@ SPHINX_VER := $(shell python -c 'from sphinx import __version__; print __version
1111
NODOC = $(shell dpkg --compare-versions $(SPHINX_VER) lt 10.1.3 && echo "nodoc" || echo "")
1212
export DEB_BUILD_OPTIONS += $(NODOC)
1313

14+
CYTHON_VER := $(shell dpkg -l cython 2>/dev/null | awk '/^ii/{print $$3;}' || echo 0)
15+
RECONF = $(shell dpkg --compare-versions $(CYTHON_VER) ge 0.19 && echo ",autoreconf" || echo "")
16+
1417
# Some tests are known to fail randomly so need to be excluded ATM
1518
NOSEARGS :=
1619
# --exclude='test_(sparse_svc_clone_with_callable_kernel|spectral_clustering_sparse|ovr_fit_predict)'
1720

1821
# Mega rule
1922
%:
2023
: # Explicit build system to avoid use of all-in-1 Makefile
21-
dh $@ --buildsystem=python_distutils --with python2
24+
dh $@ --buildsystem=python_distutils --with python2$(RECONF)
25+
26+
cythonize:
27+
@echo "D: removing previously generated by Cython sources"
28+
find -iname *.c | xargs grep -l 'Generated by Cython' | xargs rm
29+
make cython
2230

31+
override_dh_autoreconf:
32+
dh_autoreconf debian/rules -- cythonize
2333

2434
override_dh_clean:
2535
rm -rf build doc/_build doc/auto_examples *-stamp *.egg-info sklearn/datasets/__config__.py

0 commit comments

Comments
 (0)
0