diff options
-rw-r--r-- | meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch (renamed from meta/recipes-devtools/python/python-numpy/no-host-paths.patch) | 33 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python-numpy_1.10.1.bb (renamed from meta/recipes-devtools/python/python-numpy_1.7.0.bb) | 9 |
2 files changed, 31 insertions, 11 deletions
diff --git a/meta/recipes-devtools/python/python-numpy/no-host-paths.patch b/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch index d745036806..5b134edf07 100644 --- a/meta/recipes-devtools/python/python-numpy/no-host-paths.patch +++ b/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch | |||
@@ -1,18 +1,27 @@ | |||
1 | Don't search /usr and so on for libraries by default to avoid host contamination. | 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. | ||
2 | 6 | ||
3 | Upstream-Status: Inappropriate (As the code stands, this is a hack) | 7 | Upstream-Status: Inappropriate (As the code stands, this is a hack) |
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 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(-) | ||
5 | 13 | ||
6 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | 14 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py |
7 | index bac90fb..a63d796 100644 | 15 | index 9dd48e2..80e197a 100644 |
8 | --- a/numpy/distutils/system_info.py | 16 | --- a/numpy/distutils/system_info.py |
9 | +++ b/numpy/distutils/system_info.py | 17 | +++ b/numpy/distutils/system_info.py |
10 | @@ -191,41 +191,12 @@ if sys.platform == 'win32': | 18 | @@ -204,51 +204,13 @@ if sys.platform == 'win32': |
11 | default_x11_lib_dirs = [] | 19 | default_x11_lib_dirs = [] |
12 | default_x11_include_dirs = [] | 20 | default_x11_include_dirs = [] |
13 | else: | 21 | else: |
14 | - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', | 22 | - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', |
15 | - '/opt/local/lib', '/sw/lib'], platform_bits) | 23 | - '/opt/local/lib', '/sw/lib'], platform_bits) |
24 | default_runtime_dirs = [] | ||
16 | - default_include_dirs = ['/usr/local/include', | 25 | - default_include_dirs = ['/usr/local/include', |
17 | - '/opt/include', '/usr/include', | 26 | - '/opt/include', '/usr/include', |
18 | - # path of umfpack under macports | 27 | - # path of umfpack under macports |
@@ -35,17 +44,26 @@ index bac90fb..a63d796 100644 | |||
35 | - '/usr/include/X11']) | 44 | - '/usr/include/X11']) |
36 | - | 45 | - |
37 | - import subprocess as sp | 46 | - import subprocess as sp |
47 | - tmp = None | ||
38 | - try: | 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') | ||
39 | - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, | 52 | - p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE, |
40 | - stderr=open(os.devnull, 'w')) | 53 | - stderr=tmp) |
41 | - except OSError: | 54 | - except (OSError, DistutilsError): |
42 | - pass # gcc is not installed | 55 | - # OSError if gcc is not installed, or SandboxViolation (DistutilsError |
56 | - # subclass) if an old setuptools bug is triggered (see gh-3160). | ||
57 | - pass | ||
43 | - else: | 58 | - else: |
44 | - triplet = str(p.communicate()[0].decode().strip()) | 59 | - triplet = str(p.communicate()[0].decode().strip()) |
45 | - if p.returncode == 0: | 60 | - if p.returncode == 0: |
46 | - # gcc supports the "-print-multiarch" option | 61 | - # gcc supports the "-print-multiarch" option |
47 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] | 62 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] |
48 | - default_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() | ||
49 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) | 67 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) |
50 | + default_include_dirs = ['/deaddir/include'] | 68 | + default_include_dirs = ['/deaddir/include'] |
51 | + default_src_dirs = ['.', '/deaddir/src'] | 69 | + default_src_dirs = ['.', '/deaddir/src'] |
@@ -55,3 +73,6 @@ index bac90fb..a63d796 100644 | |||
55 | 73 | ||
56 | if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: | 74 | if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: |
57 | default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) | 75 | default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) |
76 | -- | ||
77 | 2.6.2 | ||
78 | |||
diff --git a/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/meta/recipes-devtools/python/python-numpy_1.10.1.bb index 81cdfde2b1..693020efdc 100644 --- a/meta/recipes-devtools/python/python-numpy_1.7.0.bb +++ b/meta/recipes-devtools/python/python-numpy_1.10.1.bb | |||
@@ -1,11 +1,10 @@ | |||
1 | SUMMARY = "A sophisticated Numeric Processing Package for Python" | 1 | SUMMARY = "A sophisticated Numeric Processing Package for Python" |
2 | SECTION = "devel/python" | 2 | SECTION = "devel/python" |
3 | LICENSE = "PSF" | 3 | LICENSE = "PSF" |
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f87832d854acbade6e9f5c601c8b30b1" | 4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9f4e88b5748e8313caaf33d081ce65a3" |
5 | PR = "r1" | ||
6 | 5 | ||
7 | SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ | 6 | SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ |
8 | file://no-host-paths.patch \ | 7 | file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ |
9 | ${CONFIGFILESURI} " | 8 | ${CONFIGFILESURI} " |
10 | 9 | ||
11 | CONFIGFILESURI ?= "" | 10 | CONFIGFILESURI ?= "" |
@@ -70,8 +69,8 @@ do_compile_prepend_class-target() { | |||
70 | 69 | ||
71 | FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" | 70 | FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" |
72 | 71 | ||
73 | SRC_URI[md5sum] = "4fa54e40b6a243416f0248123b6ec332" | 72 | SRC_URI[md5sum] = "3fed2b50906bc19018cec5fa26168aa5" |
74 | SRC_URI[sha256sum] = "f4fa70b7edbab65ee6432eb63743f5489f1919c614632b20b2fb45aa7e682ac6" | 73 | SRC_URI[sha256sum] = "8b9f453f29ce96a14e625100d3dcf8926301d36c5f622623bf8820e748510858" |
75 | 74 | ||
76 | # install what is needed for numpy.test() | 75 | # install what is needed for numpy.test() |
77 | RDEPENDS_${PN} = "python-unittest \ | 76 | RDEPENDS_${PN} = "python-unittest \ |