From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- ...h-usr-and-so-on-for-libraries-by-default-.patch | 55 +++++++++------------- 1 file changed, 23 insertions(+), 32 deletions(-) (limited to 'external/poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch') diff --git a/external/poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/external/poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch index 516ccd7b..98a97058 100644 --- a/external/poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch +++ b/external/poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch @@ -1,7 +1,8 @@ -From c8c6649b29a08f82e1d6761a6d62ce5f632313c5 Mon Sep 17 00:00:00 2001 +From 672a75c8417ce08db9e31fc415ec445479231d5a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 10 Dec 2015 13:20:30 +0200 -Subject: [PATCH 1/3] Don't search /usr and so on for libraries by default to +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) @@ -9,16 +10,16 @@ Signed-off-by: Ross Burton Signed-off-by: Alexander Kanavin --- - numpy/distutils/system_info.py | 50 +++++------------------------------------- - 1 file changed, 6 insertions(+), 44 deletions(-) + 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 bea120c..544e056 100644 +index ba2b1f4..f94dce1 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py -@@ -262,51 +262,13 @@ if sys.platform == 'win32': +@@ -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) @@ -44,36 +45,26 @@ index bea120c..544e056 100644 - default_x11_include_dirs.extend(['/usr/lib/X11/include', - '/usr/include/X11']) - -- import subprocess as sp -- tmp = None -- try: -- # Explicitly open/close file to avoid ResourceWarning when -- # tests are run in debug mode Python 3. -- tmp = open(os.devnull, 'w') -- p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.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)] -- finally: -- if tmp is not None: -- tmp.close() +- 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')) --- -2.16.1 - -- cgit 1.2.3-korg