File: deb_use_system_joblib

package info (click to toggle)
scikit-learn 0.20.2%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 51,036 kB
  • sloc: python: 108,171; ansic: 8,722; cpp: 5,651; makefile: 192; sh: 40
file content (37 lines) | stat: -rw-r--r-- 1,138 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Yaroslav Halchenko <debian@onerussian.com>
Subject: use system-wide joblib and do not attempt to install joblib/test

 Relies on DFSG-ed sources with no joblib present

--- /dev/null
+++ b/sklearn/externals/joblib.py
@@ -0,0 +16,16 @@
+import imp
+import sys
+
+
+def import_non_local(name, custom_name=None):
+    custom_name = custom_name or name
+
+    f, pathname, desc = imp.find_module(name, sys.path[1:])
+    module = imp.load_module(custom_name, f, pathname, desc)
+    if f is not None:
+        f.close()
+
+    return module
+
+
+locals().update(import_non_local('joblib').__dict__)
--- a/sklearn/externals/setup.py
+++ b/sklearn/externals/setup.py
@@ -4,10 +4,5 @@
 def configuration(parent_package='', top_path=None):
     from numpy.distutils.misc_util import Configuration
     config = Configuration('externals', parent_package, top_path)
-    config.add_subpackage('joblib')
-    config.add_subpackage('joblib/externals')
-    config.add_subpackage('joblib/externals/loky')
-    config.add_subpackage('joblib/externals/loky/backend')
-    config.add_subpackage('joblib/externals/cloudpickle')
 
     return config