summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch')
-rw-r--r--meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
new file mode 100644
index 0000000000..bbe309c556
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -0,0 +1,70 @@
1From 46eea664cf89d0602e7ff16d587c37c045b125b7 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 10 Dec 2015 13:20:30 +0200
4Subject: [PATCH] Don't search /usr and so on for libraries by default to
5
6 avoid host contamination.
7
8Upstream-Status: Inappropriate (As the code stands, this is a hack)
9Signed-off-by: Ross Burton <ross.burton@intel.com>
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12---
13 numpy/distutils/system_info.py | 42 +++++-----------------------------
14 1 file changed, 6 insertions(+), 36 deletions(-)
15
16diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
17index feb28f6..a48d6d1 100644
18--- a/numpy/distutils/system_info.py
19+++ b/numpy/distutils/system_info.py
20@@ -327,44 +327,14 @@ def add_system_root(library_root):
21 add_system_root(os.path.join(conda_dir, 'Library'))
22
23 else:
24- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
25- '/opt/local/lib', '/sw/lib'], platform_bits)
26 default_runtime_dirs = []
27- default_include_dirs = ['/usr/local/include',
28- '/opt/include',
29- # path of umfpack under macports
30- '/opt/local/include/ufsparse',
31- '/opt/local/include', '/sw/include',
32- '/usr/include/suitesparse']
33- default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
34-
35- default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
36- '/usr/lib'], platform_bits)
37- default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include']
38-
39- if os.path.exists('/usr/lib/X11'):
40- globbed_x11_dir = glob('/usr/lib/*/libX11.so')
41- if globbed_x11_dir:
42- x11_so_dir = os.path.split(globbed_x11_dir[0])[0]
43- default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11'])
44- default_x11_include_dirs.extend(['/usr/lib/X11/include',
45- '/usr/include/X11'])
46-
47- with open(os.devnull, 'w') as tmp:
48- try:
49- p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
50- stderr=tmp)
51- except (OSError, DistutilsError):
52- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
53- # subclass) if an old setuptools bug is triggered (see gh-3160).
54- pass
55- else:
56- triplet = str(p.communicate()[0].decode().strip())
57- if p.returncode == 0:
58- # gcc supports the "-print-multiarch" option
59- default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
60- default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
61
62+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
63+ default_include_dirs = ['/deaddir/include']
64+ default_src_dirs = ['.', '/deaddir/src']
65+
66+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
67+ default_x11_include_dirs = ['/deaddir/include']
68
69 if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
70 default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))