diff options
Diffstat (limited to 'meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch')
| -rw-r--r-- | meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch index 8fe0d1a27e..98a9705831 100644 --- a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch +++ b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From c14554c7e2fff8dd559dfb41e7dd11392c6f85e3 Mon Sep 17 00:00:00 2001 | 1 | From 672a75c8417ce08db9e31fc415ec445479231d5a Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Thu, 10 Dec 2015 13:20:30 +0200 | 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 | 4 | Subject: [PATCH] Don't search /usr and so on for libraries by default to |
| @@ -10,14 +10,14 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> | |||
| 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 11 | 11 | ||
| 12 | --- | 12 | --- |
| 13 | numpy/distutils/system_info.py | 50 ++++------------------------------ | 13 | numpy/distutils/system_info.py | 42 ++++------------------------------ |
| 14 | 1 file changed, 6 insertions(+), 44 deletions(-) | 14 | 1 file changed, 5 insertions(+), 37 deletions(-) |
| 15 | 15 | ||
| 16 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | 16 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py |
| 17 | index 2424943..bf56a6d 100644 | 17 | index ba2b1f4..f94dce1 100644 |
| 18 | --- a/numpy/distutils/system_info.py | 18 | --- a/numpy/distutils/system_info.py |
| 19 | +++ b/numpy/distutils/system_info.py | 19 | +++ b/numpy/distutils/system_info.py |
| 20 | @@ -274,51 +274,13 @@ if sys.platform == 'win32': | 20 | @@ -278,45 +278,13 @@ if sys.platform == 'win32': |
| 21 | add_system_root(os.path.join(conda_dir, 'Library')) | 21 | add_system_root(os.path.join(conda_dir, 'Library')) |
| 22 | 22 | ||
| 23 | else: | 23 | else: |
| @@ -45,31 +45,24 @@ index 2424943..bf56a6d 100644 | |||
| 45 | - default_x11_include_dirs.extend(['/usr/lib/X11/include', | 45 | - default_x11_include_dirs.extend(['/usr/lib/X11/include', |
| 46 | - '/usr/include/X11']) | 46 | - '/usr/include/X11']) |
| 47 | - | 47 | - |
| 48 | - import subprocess as sp | 48 | - with open(os.devnull, 'w') as tmp: |
| 49 | - tmp = None | 49 | - try: |
| 50 | - try: | 50 | - p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE, |
| 51 | - # Explicitly open/close file to avoid ResourceWarning when | 51 | - stderr=tmp) |
| 52 | - # tests are run in debug mode Python 3. | 52 | - except (OSError, DistutilsError): |
| 53 | - tmp = open(os.devnull, 'w') | 53 | - # OSError if gcc is not installed, or SandboxViolation (DistutilsError |
| 54 | - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, | 54 | - # subclass) if an old setuptools bug is triggered (see gh-3160). |
| 55 | - stderr=tmp) | 55 | - pass |
| 56 | - except (OSError, DistutilsError): | 56 | - else: |
| 57 | - # OSError if gcc is not installed, or SandboxViolation (DistutilsError | 57 | - triplet = str(p.communicate()[0].decode().strip()) |
| 58 | - # subclass) if an old setuptools bug is triggered (see gh-3160). | 58 | - if p.returncode == 0: |
| 59 | - pass | 59 | - # gcc supports the "-print-multiarch" option |
| 60 | - else: | 60 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] |
| 61 | - triplet = str(p.communicate()[0].decode().strip()) | 61 | - default_lib_dirs += [os.path.join("/usr/lib/", triplet)] |
| 62 | - if p.returncode == 0: | ||
| 63 | - # gcc supports the "-print-multiarch" option | ||
| 64 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
| 65 | - default_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
| 66 | - finally: | ||
| 67 | - if tmp is not None: | ||
| 68 | - tmp.close() | ||
| 69 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) | 62 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) |
| 70 | + default_include_dirs = ['/deaddir/include'] | 63 | + default_include_dirs = ['/deaddir/include'] |
| 71 | + default_src_dirs = ['.', '/deaddir/src'] | 64 | + default_src_dirs = ['.', '/deaddir/src'] |
| 72 | + | 65 | |
| 73 | + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) | 66 | + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) |
| 74 | + default_x11_include_dirs = ['/deaddir/include'] | 67 | + default_x11_include_dirs = ['/deaddir/include'] |
| 75 | 68 | ||
