diff --git a/numpy-fd15162.patch b/numpy-fd15162.patch new file mode 100644 index 0000000..c515640 --- /dev/null +++ b/numpy-fd15162.patch @@ -0,0 +1,21 @@ +Index: numpy-1.6.2/numpy/core/src/multiarray/methods.c +=================================================================== +--- numpy-1.6.2.orig/numpy/core/src/multiarray/methods.c ++++ numpy-1.6.2/numpy/core/src/multiarray/methods.c +@@ -1476,7 +1476,15 @@ array_setstate(PyArrayObject *self, PyOb + if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) { + int swap=!PyArray_ISNOTSWAPPED(self); + self->data = datastr; +- if (!_IsAligned(self) || swap) { ++#ifndef NPY_PY3K ++ /* Check that the string is not interned */ ++ if (!_IsAligned(self) || swap || PyString_CHECK_INTERNED(rawdata)) { ++#else ++ /* Bytes should always be considered immutable, but we just grab the ++ * pointer if they are large, to save memory. */ ++ if (!_IsAligned(self) || swap || (len <= 1000)) { ++#endif ++ + intp num = PyArray_NBYTES(self); + self->data = PyDataMem_NEW(num); + if (self->data == NULL) { diff --git a/python3-numpy.changes b/python3-numpy.changes index bcfb64f..ccd481f 100644 --- a/python3-numpy.changes +++ b/python3-numpy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 21 09:31:44 UTC 2012 - idonmez@suse.com + +- Add numpy-fd15162.patch which should fix python3-scipy + See https://github.com/numpy/numpy/commit/fd15162fbff5dd68c548284947d39bb2a2481183 + ------------------------------------------------------------------- Tue Nov 13 12:23:18 UTC 2012 - idonmez@suse.com diff --git a/python3-numpy.spec b/python3-numpy.spec index f577c09..8b00752 100644 --- a/python3-numpy.spec +++ b/python3-numpy.spec @@ -27,6 +27,7 @@ Group: Development/Libraries/Python Source: %{modname}-%{version}.tar.gz Patch1: numpy-buildfix.patch Patch2: numpy-python33.patch +Patch3: numpy-fd15162.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: blas-devel BuildRequires: lapack-devel @@ -88,6 +89,7 @@ This package contains files for developing applications using %{modname}. %setup -q -n %{modname}-%{version} %patch1 %patch2 -p1 +%patch3 -p1 sed -i "1d" %{modname}/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts