diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2021-11-14 13:15:55 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-15 12:55:27 +0000 |
commit | a6757e4a5272b97b144dd474d71a290dba77925b (patch) | |
tree | 683cef25bee9c805f1bed782532d1f77084018a1 /meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | |
parent | 6c220ed3f411b73d2e80e15de71d022d58db2232 (diff) | |
download | poky-a6757e4a5272b97b144dd474d71a290dba77925b.tar.gz |
python3-numpy: move recipe to python directory
This recipe had been moved out from python directory since 2016[1] in
order to share patches between python2 and python3. But now there is no
reason to keep it in its own directory as we only keep python3-nump.
Move it back to python directory.
[1] https://git.openembedded.org/openembedded-core/commit/?id=9bffe2f9fb4ce6c0b265f27e5b484fbe076c6349
(From OE-Core rev: e5702b8ebd16949c736b8c2f18bf35c0d64d80bd)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-.patch | 72 |
1 files changed, 72 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..9f5f25f9b5 --- /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,72 @@ | |||
1 | From 27f6687e49bf555fc494d2f14bae6ecd0fa30f14 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 | ||
5 | |||
6 | avoid host contamination. | ||
7 | |||
8 | Upstream-Status: Inappropriate (As the code stands, this is a hack) | ||
9 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | numpy/distutils/system_info.py | 42 +++++----------------------------- | ||
13 | 1 file changed, 6 insertions(+), 36 deletions(-) | ||
14 | |||
15 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | ||
16 | index 82e864a..135246d 100644 | ||
17 | --- a/numpy/distutils/system_info.py | ||
18 | +++ b/numpy/distutils/system_info.py | ||
19 | @@ -323,44 +323,14 @@ if sys.platform == 'win32': | ||
20 | add_system_root(os.path.join(conda_dir, 'Library')) | ||
21 | |||
22 | else: | ||
23 | - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', | ||
24 | - '/opt/local/lib', '/sw/lib'], platform_bits) | ||
25 | default_runtime_dirs = [] | ||
26 | - default_include_dirs = ['/usr/local/include', | ||
27 | - '/opt/include', | ||
28 | - # path of umfpack under macports | ||
29 | - '/opt/local/include/ufsparse', | ||
30 | - '/opt/local/include', '/sw/include', | ||
31 | - '/usr/include/suitesparse'] | ||
32 | - default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src'] | ||
33 | - | ||
34 | - default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib', | ||
35 | - '/usr/lib'], platform_bits) | ||
36 | - default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/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 | - with open(os.devnull, 'w') as tmp: | ||
47 | - try: | ||
48 | - p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE, | ||
49 | - stderr=tmp) | ||
50 | - except (OSError, DistutilsError): | ||
51 | - # OSError if gcc is not installed, or SandboxViolation (DistutilsError | ||
52 | - # subclass) if an old setuptools bug is triggered (see gh-3160). | ||
53 | - pass | ||
54 | - else: | ||
55 | - triplet = str(p.communicate()[0].decode().strip()) | ||
56 | - if p.returncode == 0: | ||
57 | - # gcc supports the "-print-multiarch" option | ||
58 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
59 | - default_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
60 | |||
61 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) | ||
62 | + default_include_dirs = ['/deaddir/include'] | ||
63 | + default_src_dirs = ['.', '/deaddir/src'] | ||
64 | + | ||
65 | + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) | ||
66 | + default_x11_include_dirs = ['/deaddir/include'] | ||
67 | |||
68 | if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: | ||
69 | default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) | ||
70 | -- | ||
71 | 2.25.1 | ||
72 | |||