Package: scikit-learn
Version: 0.15.2-3
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)
User: [email protected]
Usertags: origin-ubuntu vivid ubuntu-patch
Dear Maintainer,
scikit-learn currently FTBFS on armhf due to the patch for skipping tests.
In Ubuntu, the attached patch was applied to achieve the following:
* debian/patches/deb_skip_some_tests:
- Call SkipTest instead of nose.SkipTest to fix NameError.
- Import SkipTest from nose for test_metrics.py.
Thanks for considering the patch.
Logan Rosen
-- System Information:
Debian Release: jessie/sid
APT prefers vivid-updates
APT policy: (500, 'vivid-updates'), (500, 'vivid-security'), (500, 'vivid'),
(100, 'vivid-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-28-generic (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: upstart (via init_is_upstart())
diff -Nru scikit-learn-0.15.2/debian/patches/deb_skip_some_tests_on_arm scikit-learn-0.15.2/debian/patches/deb_skip_some_tests_on_arm
--- scikit-learn-0.15.2/debian/patches/deb_skip_some_tests_on_arm 2014-10-07 22:14:36.000000000 -0400
+++ scikit-learn-0.15.2/debian/patches/deb_skip_some_tests_on_arm 2014-12-24 03:41:27.000000000 -0500
@@ -1,25 +1,33 @@
--- a/sklearn/feature_extraction/tests/test_text.py
+++ b/sklearn/feature_extraction/tests/test_text.py
-@@ -357,6 +357,10 @@ def test_tfidf_no_smoothing():
+@@ -357,6 +357,10 @@
numpy_provides_div0_warning = len(w) == 1
in_warning_message = 'divide by zero'
+ import platform
+ if platform.uname()[4].startswith('armv'):
-+ raise nose.SkipTest("no warning gets issued on armel")
++ raise SkipTest("no warning gets issued on armel")
+
tfidf = assert_warns_message(RuntimeWarning, in_warning_message,
tr.fit_transform, X).toarray()
if not numpy_provides_div0_warning:
--- a/sklearn/metrics/tests/test_metrics.py
+++ b/sklearn/metrics/tests/test_metrics.py
-@@ -1221,6 +1221,9 @@ def test_precision_recall_curve_toydata(
+@@ -1,6 +1,7 @@
+ from __future__ import division, print_function
+
+ import numpy as np
++from nose import SkipTest
+ from functools import partial
+ from itertools import product
+ import warnings
+@@ -1221,6 +1222,9 @@
y_true = [0, 0]
y_score = [0.25, 0.75]
+ import platform
+ if platform.uname()[4].startswith('armv'):
-+ raise nose.SkipTest("no precision-related exceptions get issued on armel")
++ raise SkipTest("no precision-related exceptions get issued on armel")
assert_raises(Exception, precision_recall_curve, y_true, y_score)
assert_raises(Exception, average_precision_score, y_true, y_score)