File: Don-t-check-for-existence-of-libfann.patch

package info (click to toggle)
python-fann2 1%3A1.1.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 520 kB
  • sloc: cpp: 1,615; ansic: 862; python: 116; makefile: 28; sh: 24
file content (48 lines) | stat: -rw-r--r-- 1,516 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
38
39
40
41
42
43
44
45
46
47
48
From: Christian Kastner <ckk@debian.org>
Date: Sun, 17 Feb 2019 12:13:49 +0100
Subject: Don't check for existence of libfann

It's in Build-Depends, and therefore present.
---
 setup.py | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/setup.py b/setup.py
index 174b137..cb3eae4 100755
--- a/setup.py
+++ b/setup.py
@@ -53,25 +53,6 @@ def find_x(path1):
         if "doublefann" in lib_dir:
             return True
 
-def find_fann():
-    '''Find doublefann library'''
-    # FANN possible libs directories (as $LD_LIBRARY_PATH), also includes
-    # pkgsrc framework support.
-    if sys.platform == "win32":
-        dirs = sys.path
-        for ver in dirs:
-            if os.path.isdir(ver):
-                if find_x(ver):
-                    return True
-        raise Exception("Couldn't find FANN source libs!")
-    else:
-        dirs = ['/lib', '/usr/lib', '/usr/lib64', '/usr/local/lib', '/usr/pkg/lib']
-        for path in dirs:
-            if os.path.isdir(path):
-                if find_x(path):
-                    return True
-        raise Exception("Couldn't find FANN source libs!")
-
 def find_swig():
     '''Find SWIG executable path'''
     for executable in ("swig2.0", "swig"):
@@ -81,8 +62,6 @@ def find_swig():
 
 def build_swig():
     '''Run SWIG with specified parameters'''
-    print("Looking for FANN libs...")
-    find_fann()
     print("running SWIG...")
     swig_bin = find_swig()
     swig_cmd = [swig_bin, '-c++', '-python', 'fann2/fann2.i']