mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-02-06 23:50:28 +00:00
python3-numpy: add from oe-core
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
committed by
Khem Raj
parent
1a42debe44
commit
24d6260ea0
@@ -0,0 +1,70 @@
|
||||
From 672a75c8417ce08db9e31fc415ec445479231d5a Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Thu, 10 Dec 2015 13:20:30 +0200
|
||||
Subject: [PATCH] Don't search /usr and so on for libraries by default to
|
||||
|
||||
avoid host contamination.
|
||||
|
||||
Upstream-Status: Inappropriate (As the code stands, this is a hack)
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
|
||||
---
|
||||
numpy/distutils/system_info.py | 42 ++++------------------------------
|
||||
1 file changed, 5 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
|
||||
index ba2b1f4..f94dce1 100644
|
||||
--- a/numpy/distutils/system_info.py
|
||||
+++ b/numpy/distutils/system_info.py
|
||||
@@ -278,45 +278,13 @@ if sys.platform == 'win32':
|
||||
add_system_root(os.path.join(conda_dir, 'Library'))
|
||||
|
||||
else:
|
||||
- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
|
||||
- '/opt/local/lib', '/sw/lib'], platform_bits)
|
||||
default_runtime_dirs = []
|
||||
- default_include_dirs = ['/usr/local/include',
|
||||
- '/opt/include', '/usr/include',
|
||||
- # path of umfpack under macports
|
||||
- '/opt/local/include/ufsparse',
|
||||
- '/opt/local/include', '/sw/include',
|
||||
- '/usr/include/suitesparse']
|
||||
- default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
|
||||
-
|
||||
- default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
|
||||
- '/usr/lib'], platform_bits)
|
||||
- default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
|
||||
- '/usr/include']
|
||||
-
|
||||
- if os.path.exists('/usr/lib/X11'):
|
||||
- globbed_x11_dir = glob('/usr/lib/*/libX11.so')
|
||||
- if globbed_x11_dir:
|
||||
- x11_so_dir = os.path.split(globbed_x11_dir[0])[0]
|
||||
- default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11'])
|
||||
- default_x11_include_dirs.extend(['/usr/lib/X11/include',
|
||||
- '/usr/include/X11'])
|
||||
-
|
||||
- with open(os.devnull, 'w') as tmp:
|
||||
- try:
|
||||
- p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
|
||||
- stderr=tmp)
|
||||
- except (OSError, DistutilsError):
|
||||
- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
|
||||
- # subclass) if an old setuptools bug is triggered (see gh-3160).
|
||||
- pass
|
||||
- else:
|
||||
- triplet = str(p.communicate()[0].decode().strip())
|
||||
- if p.returncode == 0:
|
||||
- # gcc supports the "-print-multiarch" option
|
||||
- default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
|
||||
- default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
|
||||
+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
|
||||
+ default_include_dirs = ['/deaddir/include']
|
||||
+ default_src_dirs = ['.', '/deaddir/src']
|
||||
|
||||
+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
|
||||
+ default_x11_include_dirs = ['/deaddir/include']
|
||||
|
||||
if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
|
||||
default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
|
||||
@@ -0,0 +1,32 @@
|
||||
From b881e0b2ba9cf1a4aa351a1c1ea90b1e1776ce21 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Mon, 12 Aug 2019 15:37:36 +0200
|
||||
Subject: [PATCH] numpy/random/setup.py: remove the detection of x86 targets
|
||||
via uname()
|
||||
|
||||
This was badly breaking compilation for ARM targets (and possibly
|
||||
other non-x86 targets); if -msse2 is desirable for x86 builds it has
|
||||
to be passed through another channel.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
numpy/random/setup.py | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/numpy/random/setup.py b/numpy/random/setup.py
|
||||
index a1bf3b8..60fb534 100644
|
||||
--- a/numpy/random/setup.py
|
||||
+++ b/numpy/random/setup.py
|
||||
@@ -49,11 +49,6 @@ def configuration(parent_package='', top_path=None):
|
||||
elif not is_msvc:
|
||||
# Some bit generators require c99
|
||||
EXTRA_COMPILE_ARGS += ['-std=c99']
|
||||
- INTEL_LIKE = any(arch in platform.machine()
|
||||
- for arch in ('x86', 'i686', 'i386', 'amd64'))
|
||||
- if INTEL_LIKE:
|
||||
- # Assumes GCC or GCC-like compiler
|
||||
- EXTRA_COMPILE_ARGS += ['-msse2']
|
||||
|
||||
# Use legacy integer variable sizes
|
||||
LEGACY_DEFS = [('NP_RANDOM_LEGACY', '1')]
|
||||
Reference in New Issue
Block a user