summaryrefslogtreecommitdiff
path: root/extra/python-numpy
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-18 10:38:15 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-18 10:38:15 -0300
commit59d570b2f4d752b3cd4dfcdf2ce8c75993d9c2eb (patch)
tree452fb18314fb6d4393552d1ef1190a3168353f44 /extra/python-numpy
parentbb3524a1ba0370174d0c586ae94cd503b562a207 (diff)
parent9e3985ed7c9851da65023a0ab3d0739cce1858e2 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-staging/gambas2/PKGBUILD community-staging/gambas3/PKGBUILD community-staging/libextractor/PKGBUILD community-staging/pdf2djvu/PKGBUILD community/dante/PKGBUILD community/gnunet/PKGBUILD community/luafilesystem/PKGBUILD community/luajit/PKGBUILD community/python-mpi4py/PKGBUILD community/python-psutil/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/pycrypto/PKGBUILD extra/pygobject/PKGBUILD extra/pygobject2/PKGBUILD extra/pyopenssl/PKGBUILD extra/python/PKGBUILD extra/vde2/PKGBUILD gnome-unstable/clutter-gtk/PKGBUILD gnome-unstable/clutter/PKGBUILD gnome-unstable/eog/PKGBUILD gnome-unstable/evolution-data-server/PKGBUILD gnome-unstable/gcr/PKGBUILD gnome-unstable/gnome-desktop/PKGBUILD gnome-unstable/gnome-keyring/PKGBUILD gnome-unstable/gnome-themes-standard/PKGBUILD gnome-unstable/gobject-introspection/PKGBUILD staging/kdebase-workspace/PKGBUILD testing/iputils/PKGBUILD testing/php/PKGBUILD testing/php/php-fpm.conf.in.patch testing/php/php-fpm.service testing/php/rc.d.php-fpm
Diffstat (limited to 'extra/python-numpy')
-rwxr-xr-xextra/python-numpy/PKGBUILD19
-rw-r--r--extra/python-numpy/numpy-1.6.2-python-3.3-build-fix.patch92
2 files changed, 102 insertions, 9 deletions
diff --git a/extra/python-numpy/PKGBUILD b/extra/python-numpy/PKGBUILD
index d6c41b055..4ba4575da 100755
--- a/extra/python-numpy/PKGBUILD
+++ b/extra/python-numpy/PKGBUILD
@@ -1,33 +1,34 @@
-# $Id: PKGBUILD 164237 2012-07-28 03:14:33Z stephane $
+# $Id: PKGBUILD 169025 2012-10-17 10:20:51Z allan $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
pkgbase=python-numpy
pkgname=('python2-numpy' 'python-numpy')
-pkgver=1.6.2
+pkgver=1.7.0
+_pkgver=1.7.0b2
pkgrel=1
pkgdesc="Scientific tools for Python"
arch=('i686' 'x86_64' 'mips64el')
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=('95ed6c9dcc94af1fc1642ea2a33c1bba')
+source=(http://downloads.sourceforge.net/numpy/numpy-${_pkgver}.tar.gz)
+md5sums=('1b62cf0e34e2db58b0241b00d603df24')
build() {
cd "${srcdir}"
- cp -a numpy-${pkgver} numpy-py2-${pkgver}
+ cp -a numpy-${_pkgver} numpy-py2-${_pkgver}
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python2"
- cd "${srcdir}/numpy-py2-${pkgver}"
+ cd "${srcdir}/numpy-py2-${_pkgver}"
python2 setup.py config_fc --fcompiler=gnu95 build
echo "Building Python3"
- cd "${srcdir}/numpy-${pkgver}"
+ cd "${srcdir}/numpy-${_pkgver}"
python setup.py config_fc --fcompiler=gnu95 build
}
@@ -35,7 +36,7 @@ package_python2-numpy() {
depends=('lapack' 'python2')
optdepends=('python-nose: testsuite')
- cd "${srcdir}/numpy-py2-${pkgver}"
+ 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"
@@ -53,7 +54,7 @@ package_python-numpy() {
replaces=('python3-numpy')
conflicts=('python3-numpy')
- cd "${srcdir}/numpy-${pkgver}"
+ 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"
diff --git a/extra/python-numpy/numpy-1.6.2-python-3.3-build-fix.patch b/extra/python-numpy/numpy-1.6.2-python-3.3-build-fix.patch
new file mode 100644
index 000000000..072afbc0e
--- /dev/null
+++ b/extra/python-numpy/numpy-1.6.2-python-3.3-build-fix.patch
@@ -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