diff options
author | Ross Burton <ross.burton@intel.com> | 2014-01-28 17:31:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 18:01:47 +0000 |
commit | ced097eb4e30133acc6c3e9ed841b3463844cd39 (patch) | |
tree | c888bcbe987f9d43e2ab39b3f0ebf4f8841b05be /meta/recipes-devtools | |
parent | 9532004b527fdf3a819b8b0e7e64833003a4b1d4 (diff) | |
download | poky-ced097eb4e30133acc6c3e9ed841b3463844cd39.tar.gz |
python-numpy: don't search host directories for libraries
The build process hard-codes searches of various directories in /usr when
looking for libraries, delete this to avoid host contamination.
(From OE-Core rev: 9febe2d184ef76b7cacace15cbe17968e8c37617)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/python/python-numpy/no-host-paths.patch | 57 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python-numpy_1.7.0.bb | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-numpy/no-host-paths.patch b/meta/recipes-devtools/python/python-numpy/no-host-paths.patch new file mode 100644 index 0000000000..0efb01a6bb --- /dev/null +++ b/meta/recipes-devtools/python/python-numpy/no-host-paths.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | Don't search /usr and so on for libraries by default to avoid host contamination. | ||
2 | |||
3 | Upstream-Status: Inapproprite (As the code stands, this is a hack) | ||
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
5 | |||
6 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | ||
7 | index bac90fb..a63d796 100644 | ||
8 | --- a/numpy/distutils/system_info.py | ||
9 | +++ b/numpy/distutils/system_info.py | ||
10 | @@ -191,41 +191,12 @@ if sys.platform == 'win32': | ||
11 | default_x11_lib_dirs = [] | ||
12 | default_x11_include_dirs = [] | ||
13 | else: | ||
14 | - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', | ||
15 | - '/opt/local/lib', '/sw/lib'], platform_bits) | ||
16 | - default_include_dirs = ['/usr/local/include', | ||
17 | - '/opt/include', '/usr/include', | ||
18 | - # path of umfpack under macports | ||
19 | - '/opt/local/include/ufsparse', | ||
20 | - '/opt/local/include', '/sw/include', | ||
21 | - '/usr/include/suitesparse'] | ||
22 | - default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src'] | ||
23 | - | ||
24 | - default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib', | ||
25 | - '/usr/lib'], platform_bits) | ||
26 | - default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include', | ||
27 | - '/usr/include'] | ||
28 | - | ||
29 | - if os.path.exists('/usr/lib/X11'): | ||
30 | - globbed_x11_dir = glob('/usr/lib/*/libX11.so') | ||
31 | - if globbed_x11_dir: | ||
32 | - x11_so_dir = os.path.split(globbed_x11_dir[0])[0] | ||
33 | - default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11']) | ||
34 | - default_x11_include_dirs.extend(['/usr/lib/X11/include', | ||
35 | - '/usr/include/X11']) | ||
36 | - | ||
37 | - import subprocess as sp | ||
38 | - try: | ||
39 | - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, | ||
40 | - stderr=open(os.devnull, 'w')) | ||
41 | - except OSError: | ||
42 | - pass # gcc is not installed | ||
43 | - else: | ||
44 | - triplet = str(p.communicate()[0].decode().strip()) | ||
45 | - if p.returncode == 0: | ||
46 | - # gcc supports the "-print-multiarch" option | ||
47 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
48 | - default_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
49 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) | ||
50 | + default_include_dirs = ['/deaddir/include'] | ||
51 | + default_src_dirs = ['.', '/deaddir/src'] | ||
52 | + | ||
53 | + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) | ||
54 | + default_x11_include_dirs = ['/deaddir/include'] | ||
55 | |||
56 | if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: | ||
57 | default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) | ||
diff --git a/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/meta/recipes-devtools/python/python-numpy_1.7.0.bb index 04cb2f183f..c91cdf6eae 100644 --- a/meta/recipes-devtools/python/python-numpy_1.7.0.bb +++ b/meta/recipes-devtools/python/python-numpy_1.7.0.bb | |||
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f87832d854acbade6e9f5c601c8b30b1" | |||
5 | PR = "r1" | 5 | PR = "r1" |
6 | 6 | ||
7 | SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ | 7 | SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ |
8 | file://no-host-paths.patch \ | ||
8 | ${CONFIGFILESURI} " | 9 | ${CONFIGFILESURI} " |
9 | 10 | ||
10 | CONFIGFILESURI ?= "" | 11 | CONFIGFILESURI ?= "" |