From c4bb0b4df77adf3b81fcc01509bbf5ab64eb5220 Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Tue, 18 Oct 2011 15:39:29 -0400
Subject: [PATCH] BF: fixing movement of scikits.learn into compat package

---
 debian/rules | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index 7b283e5e7a..8aa45cee55 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,7 +30,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
 	export JOBLIB_MULTIPROCESSING=0; \
 	cd build/; python$* /usr/bin/nosetests -s sklearn && \
-			   { python$* /usr/bin/nosetests --with-doctest --doctest-extension=rst ../doc/ || : } # doctests are failing ATM
+			   { python$* /usr/bin/nosetests --with-doctest --doctest-extension=rst ../doc/ || : ; } # doctests are failing ATM
 else
 	: # Skip unittests due to nocheck
 endif
@@ -68,10 +68,12 @@ override_dh_pysupport:
 	: # Prune scikits/__init__.py to avoid conflicts
 	find debian -wholename \*scikits/__init__.py -delete
 	: # Move scikits. space into a compatibility package
-	skd=$$(find debian -wholename \*scikits -type d); \
-	skdbd=$$(basedir $$skd); \
-	skdbd_=$${sdkbd//sklearn/scikits-learn}; \
-	mv $$skd $$skdbd_
+	find debian -wholename \*scikits -type d | while read skd; do \
+		skbd=$$(dirname $$skd); \
+		skbd_=$${skbd//sklearn/scikits-learn}; \
+		mkdir -p $$skbd_; \
+		mv $$skd $$skbd_; \
+	done
 	dh_pysupport
 
 ## immediately useable documentation and exemplar scripts/data
-- 
GitLab