Date: Wednesday, March 13, 2013 @ 03:09:45 Author: jgc Revision: 179941
archrelease: copy trunk to extra-i686, extra-x86_64 Added: python-numpy/repos/extra-i686/PKGBUILD (from rev 179940, python-numpy/trunk/PKGBUILD) python-numpy/repos/extra-i686/numpy-1.6.2-python-3.3-build-fix.patch (from rev 179940, python-numpy/trunk/numpy-1.6.2-python-3.3-build-fix.patch) python-numpy/repos/extra-x86_64/PKGBUILD (from rev 179940, python-numpy/trunk/PKGBUILD) python-numpy/repos/extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch (from rev 179940, python-numpy/trunk/numpy-1.6.2-python-3.3-build-fix.patch) Deleted: python-numpy/repos/extra-i686/PKGBUILD python-numpy/repos/extra-i686/numpy-1.6.2-python-3.3-build-fix.patch python-numpy/repos/extra-x86_64/PKGBUILD python-numpy/repos/extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch -----------------------------------------------------+ extra-i686/PKGBUILD | 139 +++++++------ extra-i686/numpy-1.6.2-python-3.3-build-fix.patch | 184 +++++++++--------- extra-x86_64/PKGBUILD | 139 +++++++------ extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch | 184 +++++++++--------- 4 files changed, 338 insertions(+), 308 deletions(-) Deleted: extra-i686/PKGBUILD =================================================================== --- extra-i686/PKGBUILD 2013-03-13 02:09:37 UTC (rev 179940) +++ extra-i686/PKGBUILD 2013-03-13 02:09:45 UTC (rev 179941) @@ -1,62 +0,0 @@ -# $Id$ -# Maintainer: Jan de Groot <j...@archlinux.org> -# Contributor: Douglas Soares de Andrade <d...@aur.archlinux.org> -# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> - -pkgbase=python-numpy -pkgname=('python2-numpy' 'python-numpy') -pkgver=1.7.0 -_pkgver=1.7.0b2 -pkgrel=1 -pkgdesc="Scientific tools for Python" -arch=('i686' 'x86_64') -license=('custom') -url="http://numpy.scipy.org/" -makedepends=('lapack' 'python' 'python2' 'python-distribute' 'python2-distribute' 'gcc-fortran' 'python-nose') -source=(http://downloads.sourceforge.net/numpy/numpy-${_pkgver}.tar.gz) -md5sums=('1b62cf0e34e2db58b0241b00d603df24') - -build() { - cd "${srcdir}" - cp -a numpy-${_pkgver} numpy-py2-${_pkgver} - - export Atlas=None - export LDFLAGS="$LDFLAGS -shared" - - echo "Building Python2" - cd "${srcdir}/numpy-py2-${_pkgver}" - python2 setup.py config_fc --fcompiler=gnu95 build - - echo "Building Python3" - cd "${srcdir}/numpy-${_pkgver}" - python setup.py config_fc --fcompiler=gnu95 build -} - -package_python2-numpy() { - depends=('lapack' 'python2') - optdepends=('python-nose: testsuite') - - cd "${srcdir}/numpy-py2-${_pkgver}" - python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 - - install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy" - install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/" - - sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ - -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ - -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ - $(find ${pkgdir} -name '*.py') -} - -package_python-numpy() { - depends=('lapack' 'python') - provides=("python3-numpy=${pkgver}") - replaces=('python3-numpy') - conflicts=('python3-numpy') - - cd "${srcdir}/numpy-${_pkgver}" - python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 - - install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy" - install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/" -} Copied: python-numpy/repos/extra-i686/PKGBUILD (from rev 179940, python-numpy/trunk/PKGBUILD) =================================================================== --- extra-i686/PKGBUILD (rev 0) +++ extra-i686/PKGBUILD 2013-03-13 02:09:45 UTC (rev 179941) @@ -0,0 +1,77 @@ +# $Id$ +# Maintainer: Jan de Groot <j...@archlinux.org> +# Contributor: Douglas Soares de Andrade <d...@aur.archlinux.org> +# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> + +pkgbase=python-numpy +pkgname=('python2-numpy' 'python-numpy') +pkgver=1.7.0 +pkgrel=2 +pkgdesc="Scientific tools for Python" +arch=('i686' 'x86_64') +license=('custom') +url="http://www.numpy.org/" +makedepends=('lapack' 'python' 'python2' 'python-distribute' 'python2-distribute' 'gcc-fortran' 'python-nose') +source=(http://downloads.sourceforge.net/numpy/numpy-${pkgver}.tar.gz) +md5sums=('4fa54e40b6a243416f0248123b6ec332') + +build() { + cd "${srcdir}" + cp -a numpy-${pkgver} numpy-py2-${pkgver} + + export ATLAS=None + export LDFLAGS="$LDFLAGS -shared" + + echo "Building Python2" + cd "${srcdir}/numpy-py2-${pkgver}" + python2 setup.py config_fc --fcompiler=gnu95 build + + echo "Building Python3" + cd "${srcdir}/numpy-${pkgver}" + python setup.py config_fc --fcompiler=gnu95 build +} + +package_python2-numpy() { + depends=('lapack' 'python2') + optdepends=('python-nose: testsuite') + + _pyver=2.7 + + export ATLAS=None + export LDFLAGS="$LDFLAGS -shared" + + cd "${srcdir}/numpy-py2-${pkgver}" + python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy" + install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/" + + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + $(find ${pkgdir} -name '*.py') + + install -m755 -d "${pkgdir}/usr/include/python${_pyver}" + ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyver}/numpy" +} + +package_python-numpy() { + depends=('lapack' 'python') + provides=("python3-numpy=${pkgver}") + replaces=('python3-numpy') + conflicts=('python3-numpy') + + _pyver=3.3 + + export ATLAS=None + export LDFLAGS="$LDFLAGS -shared" + + cd "${srcdir}/numpy-${pkgver}" + python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}/usr/share/licenses/python-numpy" + install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-numpy/" + + install -m755 -d "${pkgdir}/usr/include/python${_pyver}" + ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyver}/numpy" +} Deleted: extra-i686/numpy-1.6.2-python-3.3-build-fix.patch =================================================================== --- extra-i686/numpy-1.6.2-python-3.3-build-fix.patch 2013-03-13 02:09:37 UTC (rev 179940) +++ extra-i686/numpy-1.6.2-python-3.3-build-fix.patch 2013-03-13 02:09:45 UTC (rev 179941) @@ -1,92 +0,0 @@ -diff --git a/numpy/core/src/multiarray/scalarapi.c b/numpy/core/src/multiarray/scalarapi.c -index 00c71f9..0afdc17 100644 ---- a/numpy/core/src/multiarray/scalarapi.c -+++ b/numpy/core/src/multiarray/scalarapi.c -@@ -641,6 +641,40 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) - itemsize = (((itemsize - 1) >> 2) + 1) << 2; - } - } -+#if PY_VERSION_HEX >= 0x03030000 -+ if (type_num == NPY_UNICODE) { -+ PyObject *u, *args; -+ char *buffer; -+ if (swap) { -+ buffer = malloc(itemsize); -+ if (buffer == NULL) { -+ PyErr_NoMemory(); -+ return NULL; -+ } -+ memcpy(buffer, data, itemsize); -+ byte_swap_vector(buffer, itemsize >> 2, 4); -+ } else { -+ buffer = data; -+ } -+ u = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buffer, -+ itemsize >> 2); -+ if (swap) { -+ free(buffer); -+ } -+ 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); -@@ -672,6 +706,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) - memcpy(destptr, data, itemsize); - return obj; - } -+#if PY_VERSION_HEX < 0x03030000 - else if (type_num == PyArray_UNICODE) { - /* tp_alloc inherited from Python PyBaseObject_Type */ - PyUnicodeObject *uni = (PyUnicodeObject*)obj; -@@ -743,6 +778,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) - #endif - return obj; - } -+#endif // PY_VERSION_HEX < 0x03030000 - else { - PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj; - vobj->base = NULL; -diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src -index e547071..12745d7 100644 ---- a/numpy/core/src/multiarray/scalartypes.c.src -+++ b/numpy/core/src/multiarray/scalartypes.c.src -@@ -2592,7 +2592,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 */ -diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c -index c4147ef..119056c 100644 ---- a/numpy/core/src/multiarray/methods.c -+++ b/numpy/core/src/multiarray/methods.c -@@ -1587,7 +1587,7 @@ array_setstate(PyArrayObject *self, PyObject *args) - if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) { - int swap=!PyArray_ISNOTSWAPPED(self); - self->data = datastr; -- if (!_IsAligned(self) || swap) { -+ if (!_IsAligned(self) || swap || (len <= 1000)) { - intp num = PyArray_NBYTES(self); - self->data = PyDataMem_NEW(num); - if (self->data == NULL) { --- -1.7.12.3 Copied: python-numpy/repos/extra-i686/numpy-1.6.2-python-3.3-build-fix.patch (from rev 179940, python-numpy/trunk/numpy-1.6.2-python-3.3-build-fix.patch) =================================================================== --- extra-i686/numpy-1.6.2-python-3.3-build-fix.patch (rev 0) +++ extra-i686/numpy-1.6.2-python-3.3-build-fix.patch 2013-03-13 02:09:45 UTC (rev 179941) @@ -0,0 +1,92 @@ +diff --git a/numpy/core/src/multiarray/scalarapi.c b/numpy/core/src/multiarray/scalarapi.c +index 00c71f9..0afdc17 100644 +--- a/numpy/core/src/multiarray/scalarapi.c ++++ b/numpy/core/src/multiarray/scalarapi.c +@@ -641,6 +641,40 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) + itemsize = (((itemsize - 1) >> 2) + 1) << 2; + } + } ++#if PY_VERSION_HEX >= 0x03030000 ++ if (type_num == NPY_UNICODE) { ++ PyObject *u, *args; ++ char *buffer; ++ if (swap) { ++ buffer = malloc(itemsize); ++ if (buffer == NULL) { ++ PyErr_NoMemory(); ++ return NULL; ++ } ++ memcpy(buffer, data, itemsize); ++ byte_swap_vector(buffer, itemsize >> 2, 4); ++ } else { ++ buffer = data; ++ } ++ u = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buffer, ++ itemsize >> 2); ++ if (swap) { ++ free(buffer); ++ } ++ 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); +@@ -672,6 +706,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) + memcpy(destptr, data, itemsize); + return obj; + } ++#if PY_VERSION_HEX < 0x03030000 + else if (type_num == PyArray_UNICODE) { + /* tp_alloc inherited from Python PyBaseObject_Type */ + PyUnicodeObject *uni = (PyUnicodeObject*)obj; +@@ -743,6 +778,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) + #endif + return obj; + } ++#endif // PY_VERSION_HEX < 0x03030000 + else { + PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj; + vobj->base = NULL; +diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src +index e547071..12745d7 100644 +--- a/numpy/core/src/multiarray/scalartypes.c.src ++++ b/numpy/core/src/multiarray/scalartypes.c.src +@@ -2592,7 +2592,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 */ +diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c +index c4147ef..119056c 100644 +--- a/numpy/core/src/multiarray/methods.c ++++ b/numpy/core/src/multiarray/methods.c +@@ -1587,7 +1587,7 @@ array_setstate(PyArrayObject *self, PyObject *args) + if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) { + int swap=!PyArray_ISNOTSWAPPED(self); + self->data = datastr; +- if (!_IsAligned(self) || swap) { ++ if (!_IsAligned(self) || swap || (len <= 1000)) { + intp num = PyArray_NBYTES(self); + self->data = PyDataMem_NEW(num); + if (self->data == NULL) { +-- +1.7.12.3 Deleted: extra-x86_64/PKGBUILD =================================================================== --- extra-x86_64/PKGBUILD 2013-03-13 02:09:37 UTC (rev 179940) +++ extra-x86_64/PKGBUILD 2013-03-13 02:09:45 UTC (rev 179941) @@ -1,62 +0,0 @@ -# $Id$ -# Maintainer: Jan de Groot <j...@archlinux.org> -# Contributor: Douglas Soares de Andrade <d...@aur.archlinux.org> -# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> - -pkgbase=python-numpy -pkgname=('python2-numpy' 'python-numpy') -pkgver=1.7.0 -_pkgver=1.7.0b2 -pkgrel=1 -pkgdesc="Scientific tools for Python" -arch=('i686' 'x86_64') -license=('custom') -url="http://numpy.scipy.org/" -makedepends=('lapack' 'python' 'python2' 'python-distribute' 'python2-distribute' 'gcc-fortran' 'python-nose') -source=(http://downloads.sourceforge.net/numpy/numpy-${_pkgver}.tar.gz) -md5sums=('1b62cf0e34e2db58b0241b00d603df24') - -build() { - cd "${srcdir}" - cp -a numpy-${_pkgver} numpy-py2-${_pkgver} - - export Atlas=None - export LDFLAGS="$LDFLAGS -shared" - - echo "Building Python2" - cd "${srcdir}/numpy-py2-${_pkgver}" - python2 setup.py config_fc --fcompiler=gnu95 build - - echo "Building Python3" - cd "${srcdir}/numpy-${_pkgver}" - python setup.py config_fc --fcompiler=gnu95 build -} - -package_python2-numpy() { - depends=('lapack' 'python2') - optdepends=('python-nose: testsuite') - - cd "${srcdir}/numpy-py2-${_pkgver}" - python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 - - install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy" - install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/" - - sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ - -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ - -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ - $(find ${pkgdir} -name '*.py') -} - -package_python-numpy() { - depends=('lapack' 'python') - provides=("python3-numpy=${pkgver}") - replaces=('python3-numpy') - conflicts=('python3-numpy') - - cd "${srcdir}/numpy-${_pkgver}" - python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 - - install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy" - install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/" -} Copied: python-numpy/repos/extra-x86_64/PKGBUILD (from rev 179940, python-numpy/trunk/PKGBUILD) =================================================================== --- extra-x86_64/PKGBUILD (rev 0) +++ extra-x86_64/PKGBUILD 2013-03-13 02:09:45 UTC (rev 179941) @@ -0,0 +1,77 @@ +# $Id$ +# Maintainer: Jan de Groot <j...@archlinux.org> +# Contributor: Douglas Soares de Andrade <d...@aur.archlinux.org> +# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> + +pkgbase=python-numpy +pkgname=('python2-numpy' 'python-numpy') +pkgver=1.7.0 +pkgrel=2 +pkgdesc="Scientific tools for Python" +arch=('i686' 'x86_64') +license=('custom') +url="http://www.numpy.org/" +makedepends=('lapack' 'python' 'python2' 'python-distribute' 'python2-distribute' 'gcc-fortran' 'python-nose') +source=(http://downloads.sourceforge.net/numpy/numpy-${pkgver}.tar.gz) +md5sums=('4fa54e40b6a243416f0248123b6ec332') + +build() { + cd "${srcdir}" + cp -a numpy-${pkgver} numpy-py2-${pkgver} + + export ATLAS=None + export LDFLAGS="$LDFLAGS -shared" + + echo "Building Python2" + cd "${srcdir}/numpy-py2-${pkgver}" + python2 setup.py config_fc --fcompiler=gnu95 build + + echo "Building Python3" + cd "${srcdir}/numpy-${pkgver}" + python setup.py config_fc --fcompiler=gnu95 build +} + +package_python2-numpy() { + depends=('lapack' 'python2') + optdepends=('python-nose: testsuite') + + _pyver=2.7 + + export ATLAS=None + export LDFLAGS="$LDFLAGS -shared" + + cd "${srcdir}/numpy-py2-${pkgver}" + python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy" + install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/" + + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + $(find ${pkgdir} -name '*.py') + + install -m755 -d "${pkgdir}/usr/include/python${_pyver}" + ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyver}/numpy" +} + +package_python-numpy() { + depends=('lapack' 'python') + provides=("python3-numpy=${pkgver}") + replaces=('python3-numpy') + conflicts=('python3-numpy') + + _pyver=3.3 + + export ATLAS=None + export LDFLAGS="$LDFLAGS -shared" + + cd "${srcdir}/numpy-${pkgver}" + python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}/usr/share/licenses/python-numpy" + install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-numpy/" + + install -m755 -d "${pkgdir}/usr/include/python${_pyver}" + ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyver}/numpy" +} Deleted: extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch =================================================================== --- extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch 2013-03-13 02:09:37 UTC (rev 179940) +++ extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch 2013-03-13 02:09:45 UTC (rev 179941) @@ -1,92 +0,0 @@ -diff --git a/numpy/core/src/multiarray/scalarapi.c b/numpy/core/src/multiarray/scalarapi.c -index 00c71f9..0afdc17 100644 ---- a/numpy/core/src/multiarray/scalarapi.c -+++ b/numpy/core/src/multiarray/scalarapi.c -@@ -641,6 +641,40 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) - itemsize = (((itemsize - 1) >> 2) + 1) << 2; - } - } -+#if PY_VERSION_HEX >= 0x03030000 -+ if (type_num == NPY_UNICODE) { -+ PyObject *u, *args; -+ char *buffer; -+ if (swap) { -+ buffer = malloc(itemsize); -+ if (buffer == NULL) { -+ PyErr_NoMemory(); -+ return NULL; -+ } -+ memcpy(buffer, data, itemsize); -+ byte_swap_vector(buffer, itemsize >> 2, 4); -+ } else { -+ buffer = data; -+ } -+ u = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buffer, -+ itemsize >> 2); -+ if (swap) { -+ free(buffer); -+ } -+ 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); -@@ -672,6 +706,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) - memcpy(destptr, data, itemsize); - return obj; - } -+#if PY_VERSION_HEX < 0x03030000 - else if (type_num == PyArray_UNICODE) { - /* tp_alloc inherited from Python PyBaseObject_Type */ - PyUnicodeObject *uni = (PyUnicodeObject*)obj; -@@ -743,6 +778,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) - #endif - return obj; - } -+#endif // PY_VERSION_HEX < 0x03030000 - else { - PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj; - vobj->base = NULL; -diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src -index e547071..12745d7 100644 ---- a/numpy/core/src/multiarray/scalartypes.c.src -+++ b/numpy/core/src/multiarray/scalartypes.c.src -@@ -2592,7 +2592,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 */ -diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c -index c4147ef..119056c 100644 ---- a/numpy/core/src/multiarray/methods.c -+++ b/numpy/core/src/multiarray/methods.c -@@ -1587,7 +1587,7 @@ array_setstate(PyArrayObject *self, PyObject *args) - if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) { - int swap=!PyArray_ISNOTSWAPPED(self); - self->data = datastr; -- if (!_IsAligned(self) || swap) { -+ if (!_IsAligned(self) || swap || (len <= 1000)) { - intp num = PyArray_NBYTES(self); - self->data = PyDataMem_NEW(num); - if (self->data == NULL) { --- -1.7.12.3 Copied: python-numpy/repos/extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch (from rev 179940, python-numpy/trunk/numpy-1.6.2-python-3.3-build-fix.patch) =================================================================== --- extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch (rev 0) +++ extra-x86_64/numpy-1.6.2-python-3.3-build-fix.patch 2013-03-13 02:09:45 UTC (rev 179941) @@ -0,0 +1,92 @@ +diff --git a/numpy/core/src/multiarray/scalarapi.c b/numpy/core/src/multiarray/scalarapi.c +index 00c71f9..0afdc17 100644 +--- a/numpy/core/src/multiarray/scalarapi.c ++++ b/numpy/core/src/multiarray/scalarapi.c +@@ -641,6 +641,40 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) + itemsize = (((itemsize - 1) >> 2) + 1) << 2; + } + } ++#if PY_VERSION_HEX >= 0x03030000 ++ if (type_num == NPY_UNICODE) { ++ PyObject *u, *args; ++ char *buffer; ++ if (swap) { ++ buffer = malloc(itemsize); ++ if (buffer == NULL) { ++ PyErr_NoMemory(); ++ return NULL; ++ } ++ memcpy(buffer, data, itemsize); ++ byte_swap_vector(buffer, itemsize >> 2, 4); ++ } else { ++ buffer = data; ++ } ++ u = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buffer, ++ itemsize >> 2); ++ if (swap) { ++ free(buffer); ++ } ++ 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); +@@ -672,6 +706,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) + memcpy(destptr, data, itemsize); + return obj; + } ++#if PY_VERSION_HEX < 0x03030000 + else if (type_num == PyArray_UNICODE) { + /* tp_alloc inherited from Python PyBaseObject_Type */ + PyUnicodeObject *uni = (PyUnicodeObject*)obj; +@@ -743,6 +778,7 @@ PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base) + #endif + return obj; + } ++#endif // PY_VERSION_HEX < 0x03030000 + else { + PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj; + vobj->base = NULL; +diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src +index e547071..12745d7 100644 +--- a/numpy/core/src/multiarray/scalartypes.c.src ++++ b/numpy/core/src/multiarray/scalartypes.c.src +@@ -2592,7 +2592,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 */ +diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c +index c4147ef..119056c 100644 +--- a/numpy/core/src/multiarray/methods.c ++++ b/numpy/core/src/multiarray/methods.c +@@ -1587,7 +1587,7 @@ array_setstate(PyArrayObject *self, PyObject *args) + if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) { + int swap=!PyArray_ISNOTSWAPPED(self); + self->data = datastr; +- if (!_IsAligned(self) || swap) { ++ if (!_IsAligned(self) || swap || (len <= 1000)) { + intp num = PyArray_NBYTES(self); + self->data = PyDataMem_NEW(num); + if (self->data == NULL) { +-- +1.7.12.3