SHA256
1
0
forked from pool/python-numpy

Accepting request 158631 from devel:languages:python

update to 1.7.0, version update details added.
patches numpy-python33.patch, numpy-fd15162.patch and numpy-aarch64.diff now merged in upstream (forwarded request 158616 from HighwayStar)

OBS-URL: https://build.opensuse.org/request/show/158631
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=30
This commit is contained in:
Stephan Kulow 2013-03-12 10:15:05 +00:00 committed by Git OBS Bridge
parent 5a5b35419d
commit 8d10ebf29d
11 changed files with 91 additions and 143 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b83d96ab79711b548470b7aeee1272c4ba8fcbba6586a67116b566a21ed16c6
size 2585329

3
numpy-1.7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4fa70b7edbab65ee6432eb63743f5489f1919c614632b20b2fb45aa7e682ac6
size 2832457

View File

@ -1,21 +0,0 @@
--- numpy/core/include/numpy/npy_cpu.h
+++ numpy/core/include/numpy/npy_cpu.h
@@ -66,6 +66,8 @@
#define NPY_CPU_MIPSEL
#elif defined(__MIPSEB__)
#define NPY_CPU_MIPSEB
+#elif defined(__aarch64__)
+ #define NPY_CPU_AARCH64
#else
#error Unknown CPU, please report this to numpy maintainers with \
information about your platform (OS, CPU and compiler)
--- numpy/core/include/numpy/npy_endian.h
+++ numpy/core/include/numpy/npy_endian.h
@@ -25,6 +25,7 @@
|| defined(NPY_CPU_IA64) \
|| defined(NPY_CPU_ALPHA) \
|| defined(NPY_CPU_ARMEL) \
+ || defined(NPY_CPU_AARCH64) \
|| defined(NPY_CPU_SH_LE) \
|| defined(NPY_CPU_MIPSEL)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN

View File

@ -1,21 +0,0 @@
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) {

View File

@ -1,71 +0,0 @@
Index: numpy-1.6.2/numpy/core/src/multiarray/scalarapi.c
===================================================================
--- numpy-1.6.2.orig/numpy/core/src/multiarray/scalarapi.c
+++ numpy-1.6.2/numpy/core/src/multiarray/scalarapi.c
@@ -652,6 +652,34 @@ PyArray_Scalar(void *data, PyArray_Descr
itemsize = (((itemsize - 1) >> 2) + 1) << 2;
}
}
+#if PY_VERSION_HEX >= 0x03030000
+ if (type_num == NPY_UNICODE) {
+ PyObject *u, *args;
+ int byteorder;
+#if NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN
+ byteorder = -1;
+#elif NPY_BYTE_ORDER == NPY_BIG_ENDIAN
+ byteorder = +1;
+#else
+ #error Endianness undefined ?
+#endif
+ if (swap) byteorder *= -1;
+
+ u = PyUnicode_DecodeUTF32(data, itemsize, NULL, &byteorder);
+ if (u == NULL) {
+ return NULL;
+ }
+ args = Py_BuildValue("(O)", u);
+ if (args == NULL) {
+ Py_DECREF(u);
+ return NULL;
+ }
+ obj = type->tp_new(type, args, NULL);
+ Py_DECREF(u);
+ Py_DECREF(args);
+ return obj;
+ }
+#endif
if (type->tp_itemsize != 0) {
/* String type */
obj = type->tp_alloc(type, itemsize);
@@ -688,6 +716,7 @@ PyArray_Scalar(void *data, PyArray_Descr
memcpy(destptr, data, itemsize);
return obj;
}
+#if PY_VERSION_HEX < 0x0303000
else if (type_num == PyArray_UNICODE) {
/* tp_alloc inherited from Python PyBaseObject_Type */
PyUnicodeObject *uni = (PyUnicodeObject*)obj;
@@ -759,6 +788,7 @@ PyArray_Scalar(void *data, PyArray_Descr
#endif
return obj;
}
+#endif // PY_VERSION_HEX < 0x03030000
else {
PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj;
vobj->base = NULL;
Index: numpy-1.6.2/numpy/core/src/multiarray/scalartypes.c.src
===================================================================
--- numpy-1.6.2.orig/numpy/core/src/multiarray/scalartypes.c.src
+++ numpy-1.6.2/numpy/core/src/multiarray/scalartypes.c.src
@@ -2323,7 +2323,11 @@ finish:
*((npy_@name@ *)dest) = *((npy_@name@ *)src);
#elif @default@ == 1 /* unicode and strings */
if (itemsize == 0) { /* unicode */
+#if PY_VERSION_HEX >= 0x03030000
+ itemsize = PyUnicode_GetLength(robj) * PyUnicode_KIND(robj);
+#else
itemsize = ((PyUnicodeObject *)robj)->length * sizeof(Py_UNICODE);
+#endif
}
memcpy(dest, src, itemsize);
/* @default@ == 2 won't get here */

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Tue Mar 12 06:21:52 UTC 2013 - highwaystar.ru@gmail.com
- update to 1.7.0
* This release includes several new features as well as numerous
bug fixes and refactorings
Highlights:
- ``where=`` parameter to ufuncs (allows the use of boolean
arrays to choose where a computation should be done)
- ``vectorize`` improvements (added 'excluded' and 'cache'
keyword, general cleanup and bug fixes)
- ``numpy.random.choice`` (random sample generating function)
New Features:
- Reduction UFuncs Generalize axis= Parameter
- Reduction UFuncs New keepdims= Parameter
- Datetime support
- Custom formatter for printing arrays
- New function numpy.random.choice
- New function isclose
- Preliminary multi-dimensional support in the polynomial package
- Ability to pad rank-n arrays
- New argument to searchsorted
- Added experimental support for the AArch64 architecture.
* For additional details check release notes at
http://sourceforge.net/projects/numpy/files/NumPy/1.7.0/
- numpy-aarch64.diff: removed, now upstream
-------------------------------------------------------------------
Fri Jun 1 12:08:16 UTC 2012 - toddrme2178@gmail.com

View File

@ -19,7 +19,7 @@
%define modname numpy
Name: python-%{modname}-doc
%define docname numpydoc
Version: 1.6.2
Version: 1.7.0
Release: 0
%define docvers 0.4
Url: http://sourceforge.net/projects/numpy
@ -28,7 +28,6 @@ License: BSD-3-Clause
Group: Development/Libraries/Python
Source: %{modname}-%{version}.tar.gz
Patch1: numpy-buildfix.patch
Patch2: numpy-aarch64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: blas-devel
BuildRequires: lapack-devel
@ -139,7 +138,6 @@ version is recommended over that included in Numpydoc.
%prep
%setup -q -n %{modname}-%{version}
%patch1 -p0
%patch2 -p0
%build
# make the documentation
@ -174,7 +172,6 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files -n python-numpydoc
%defattr(-,root,root)
%{_bindir}/autosummary_generate
%{python_sitelib}/%{docname}/
%{python_sitelib}/%{docname}-%{docvers}-py%{py_ver}.egg-info/

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Tue Mar 12 06:21:52 UTC 2013 - highwaystar.ru@gmail.com
- update to 1.7.0
* This release includes several new features as well as numerous
bug fixes and refactorings
Highlights:
- ``where=`` parameter to ufuncs (allows the use of boolean
arrays to choose where a computation should be done)
- ``vectorize`` improvements (added 'excluded' and 'cache'
keyword, general cleanup and bug fixes)
- ``numpy.random.choice`` (random sample generating function)
New Features:
- Reduction UFuncs Generalize axis= Parameter
- Reduction UFuncs New keepdims= Parameter
- Datetime support
- Custom formatter for printing arrays
- New function numpy.random.choice
- New function isclose
- Preliminary multi-dimensional support in the polynomial package
- Ability to pad rank-n arrays
- New argument to searchsorted
- Added experimental support for the AArch64 architecture.
* For additional details check release notes at
http://sourceforge.net/projects/numpy/files/NumPy/1.7.0/
- numpy-aarch64.diff: removed, now upstream
-------------------------------------------------------------------
Tue Mar 5 22:25:53 UTC 2013 - dmueller@suse.com

View File

@ -18,7 +18,7 @@
%define modname numpy
Name: python-%{modname}
Version: 1.6.2
Version: 1.7.0
Release: 0
Url: http://sourceforge.net/projects/numpy
Summary: NumPy array processing for numbers, strings, records and objects
@ -26,7 +26,6 @@ License: BSD-3-Clause
Group: Development/Libraries/Python
Source: %{modname}-%{version}.tar.gz
Patch1: numpy-buildfix.patch
Patch2: numpy-aarch64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: blas-devel
BuildRequires: lapack-devel
@ -85,7 +84,6 @@ This package contains files for developing applications using %{modname}.
%prep
%setup -q -n %{modname}-%{version}
%patch1 -p0
%patch2
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
%build

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Tue Feb 19 06:21:35 UTC 2013 - highwaystar.ru@gmail.com
- update to 1.7.0
* This release includes several new features as well as numerous
bug fixes and refactorings
Highlights:
- ``where=`` parameter to ufuncs (allows the use of boolean
arrays to choose where a computation should be done)
- ``vectorize`` improvements (added 'excluded' and 'cache'
keyword, general cleanup and bug fixes)
- ``numpy.random.choice`` (random sample generating function)
New Features:
- Reduction UFuncs Generalize axis= Parameter
- Reduction UFuncs New keepdims= Parameter
- Datetime support
- Custom formatter for printing arrays
- New function numpy.random.choice
- New function isclose
- Preliminary multi-dimensional support in the polynomial package
- Ability to pad rank-n arrays
- New argument to searchsorted
- Added experimental support for the AArch64 architecture.
* For additional details check release notes at
http://sourceforge.net/projects/numpy/files/NumPy/1.7.0/
- numpy-fd15162.patch and numpy-python33.patch removed, because
now is is in upstream
-------------------------------------------------------------------
Wed Dec 12 02:25:57 UTC 2012 - highwaystar.ru@gmail.com

View File

@ -18,7 +18,7 @@
%define modname numpy
Name: python3-%{modname}
Version: 1.6.2
Version: 1.7.0
Release: 0
Url: http://sourceforge.net/projects/numpy
Summary: NumPy array processing for numbers, strings, records and objects
@ -26,8 +26,6 @@ License: BSD-3-Clause
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
@ -86,25 +84,8 @@ This package contains files for developing applications using %{modname}.
%prep
%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
# Fix from Fedora:
# Regenerate Cython c sources
# This is needed with numpy-1.6.2.tar.gz with python 3.3 to avoid an exception
# with an import call in the generated .c file in the tarball that uses the
# old default of -1:
# File "mtrand.pyx", line 126, in init mtrand (numpy/random/mtrand/mtrand.c:20679)
# ValueError: level must be >= 0
# due to the changes in import in 3.3
# Regenerating with a newer Cython fixes it:
%if 0%{?suse_version} && 0%{?suse_version} >= 1230
pushd numpy/random/mtrand/
rm -v mtrand.c
cython-%{py3_ver} mtrand.pyx
popd
%endif
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build