diff options
| author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2015-12-10 13:27:16 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-16 12:12:17 +0000 |
| commit | 4e653b52125d0979504f873ce829e1c8681518cf (patch) | |
| tree | 92eb5aea23744347ac50b4400adb15ed6aa41935 /meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | |
| parent | 90b72129726fea6723abb0bedf2e65887d02b60a (diff) | |
| download | poky-4e653b52125d0979504f873ce829e1c8681518cf.tar.gz | |
python-numpy: update to 1.10.1
LICENSE checksum has changed due to updated copyright years
(From OE-Core rev: 3c3932f3560c898e32287c8733b61180685ee539)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch')
| -rw-r--r-- | meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch new file mode 100644 index 0000000000..5b134edf07 --- /dev/null +++ b/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Thu, 10 Dec 2015 13:20:30 +0200 | ||
| 4 | Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid | ||
| 5 | host contamination. | ||
| 6 | |||
| 7 | Upstream-Status: Inappropriate (As the code stands, this is a hack) | ||
| 8 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 10 | --- | ||
| 11 | numpy/distutils/system_info.py | 50 +++++------------------------------------- | ||
| 12 | 1 file changed, 6 insertions(+), 44 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | ||
| 15 | index 9dd48e2..80e197a 100644 | ||
| 16 | --- a/numpy/distutils/system_info.py | ||
| 17 | +++ b/numpy/distutils/system_info.py | ||
| 18 | @@ -204,51 +204,13 @@ if sys.platform == 'win32': | ||
| 19 | default_x11_lib_dirs = [] | ||
| 20 | default_x11_include_dirs = [] | ||
| 21 | else: | ||
| 22 | - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', | ||
| 23 | - '/opt/local/lib', '/sw/lib'], platform_bits) | ||
| 24 | default_runtime_dirs = [] | ||
| 25 | - default_include_dirs = ['/usr/local/include', | ||
| 26 | - '/opt/include', '/usr/include', | ||
| 27 | - # path of umfpack under macports | ||
| 28 | - '/opt/local/include/ufsparse', | ||
| 29 | - '/opt/local/include', '/sw/include', | ||
| 30 | - '/usr/include/suitesparse'] | ||
| 31 | - default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src'] | ||
| 32 | - | ||
| 33 | - default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib', | ||
| 34 | - '/usr/lib'], platform_bits) | ||
| 35 | - default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include', | ||
| 36 | - '/usr/include'] | ||
| 37 | - | ||
| 38 | - if os.path.exists('/usr/lib/X11'): | ||
| 39 | - globbed_x11_dir = glob('/usr/lib/*/libX11.so') | ||
| 40 | - if globbed_x11_dir: | ||
| 41 | - x11_so_dir = os.path.split(globbed_x11_dir[0])[0] | ||
| 42 | - default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11']) | ||
| 43 | - default_x11_include_dirs.extend(['/usr/lib/X11/include', | ||
| 44 | - '/usr/include/X11']) | ||
| 45 | - | ||
| 46 | - import subprocess as sp | ||
| 47 | - tmp = None | ||
| 48 | - try: | ||
| 49 | - # Explicitly open/close file to avoid ResourceWarning when | ||
| 50 | - # tests are run in debug mode Python 3. | ||
| 51 | - tmp = open(os.devnull, 'w') | ||
| 52 | - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, | ||
| 53 | - stderr=tmp) | ||
| 54 | - except (OSError, DistutilsError): | ||
| 55 | - # OSError if gcc is not installed, or SandboxViolation (DistutilsError | ||
| 56 | - # subclass) if an old setuptools bug is triggered (see gh-3160). | ||
| 57 | - pass | ||
| 58 | - else: | ||
| 59 | - triplet = str(p.communicate()[0].decode().strip()) | ||
| 60 | - if p.returncode == 0: | ||
| 61 | - # gcc supports the "-print-multiarch" option | ||
| 62 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
| 63 | - default_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
| 64 | - finally: | ||
| 65 | - if tmp is not None: | ||
| 66 | - tmp.close() | ||
| 67 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) | ||
| 68 | + default_include_dirs = ['/deaddir/include'] | ||
| 69 | + default_src_dirs = ['.', '/deaddir/src'] | ||
| 70 | + | ||
| 71 | + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) | ||
| 72 | + default_x11_include_dirs = ['/deaddir/include'] | ||
| 73 | |||
| 74 | if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: | ||
| 75 | default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) | ||
| 76 | -- | ||
| 77 | 2.6.2 | ||
| 78 | |||
