diff options
-rw-r--r-- | community/py-numpy/APKBUILD | 102 | ||||
-rw-r--r-- | community/py-numpy/fix-undefined-functions-on-big-endian-systems.patch | 35 | ||||
-rw-r--r-- | community/py-numpy/numpy-1.11.0-musl.patch | 9 | ||||
-rw-r--r-- | community/py3-numpy/APKBUILD | 54 | ||||
-rw-r--r-- | community/py3-numpy/numpy-1.17.0-musl.patch | 39 | ||||
-rw-r--r-- | community/py3-numpy/site.cfg (renamed from community/py-numpy/site.cfg) | 0 |
6 files changed, 93 insertions, 146 deletions
diff --git a/community/py-numpy/APKBUILD b/community/py-numpy/APKBUILD deleted file mode 100644 index 002dd8d4b3..0000000000 --- a/community/py-numpy/APKBUILD +++ /dev/null @@ -1,102 +0,0 @@ -# Contributor: Francesco Colista <fcolista@alpinelinux.org> -# Contributor: Jakub Jirutka <jakub@jirutka.cz> -# Contributor: Martell Malone <martellmalone@gmail.com> -# Maintainer: Francesco Colista <fcolista@alpinelinux.org> -pkgname=py-numpy -_pkgname=numpy -pkgver=1.16.4 -pkgrel=1 -pkgdesc="Scientific tools for Python" -url="https://www.numpy.org/" -arch="all" -license="BSD-3-Clause" -options="!check" -makedepends="python2-dev py-setuptools python3-dev - cython openblas-dev>=0.3.0 gfortran py-nose" -subpackages="$pkgname-dev - $pkgname-doc - $pkgname-f2py::noarch - py2-$_pkgname-f2py:_f2py:noarch - py3-$_pkgname-f2py:_f2py:noarch - py2-$_pkgname:_py - py3-$_pkgname:_py" -source="https://github.com/numpy/numpy/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz - site.cfg" -builddir="$srcdir/$_pkgname-$pkgver" - -prepare() { - default_prepare - cp "$srcdir"/site.cfg "$builddir"/ -} - -build() { - export Atlas=None - LDFLAGS="$LDFLAGS -shared" - - python2 setup.py build config_fc --fcompiler=gnu95 - python3 setup.py build config_fc --fcompiler=gnu95 -} - -package() { - local python; for python in python2 python3; do - $python setup.py install --prefix=/usr --root="$pkgdir" \ - config_fc --fcompiler=gnu95 - done - - install -D -m 644 LICENSE.txt \ - "$pkgdir"/usr/share/licenses/$pkgname/LICENSE -} - -dev() { - cd "$pkgdir" - - # Move tests to -dev subpackage. - find usr/lib/python* -type d -name tests | while read path; do - mkdir -p "$subpkgdir/$path" - mv "$path"/* "$subpkgdir/$path"/ - done - - default_dev -} - -f2py() { - mkdir -p "$subpkgdir" -} - -_f2py() { - local pyver="${subpkgname:2:1}" - local python="python$pyver" - - pkgdesc="f2py for numpy (for $python)" - depends="py$pyver-numpy=$pkgver-r$pkgrel $python-dev" - install_if="$pkgname-f2py=$pkgver-r$pkgrel $python" - [ "$pyver" = 3 ] || replaces="$pkgname" - - local dir="$(_pylibdir $python)/site-packages/numpy" - - mkdir -p "$subpkgdir/$dir" "$subpkgdir"/usr/bin - mv "$pkgdir/$dir"/f2py "$subpkgdir/$dir"/ - mv "$pkgdir"/usr/bin/f2py$pyver "$subpkgdir"/usr/bin/ -} - -_py() { - local pyver="${subpkgname:2:1}" - local python="python$pyver" - - pkgdesc="$pkgdesc $pyver" - install_if="$pkgname=$pkgver-r$pkgrel $python" - [ "$pyver" = 3 ] || replaces="$pkgname" - - local libdir=$(_pylibdir $python) - - mkdir -p "$subpkgdir/$libdir" - mv "$pkgdir/$libdir"/* "$subpkgdir/$libdir"/ - rmdir -p "$pkgdir/$libdir" 2>/dev/null || true -} - -_pylibdir() { - "$1" -c 'import sysconfig; print(sysconfig.get_path("stdlib"))' -} - -sha512sums="427897a9e28a7e7648ebb0df8897a31c358fc5941773a120a534af6375d5963298f283185f36a7ac1c1e2b3511d2ba03d0779438acc849e1cf654f1454fc3c02 numpy-1.16.4.tar.gz -21ca8db304cbbf5949f07702f2a42bb5e5a0d641921e36649555a41b0e48f04e96f53760417823177ac27f6de24b2191e6e1d5f0eb393beafa29f7484e23284f site.cfg" diff --git a/community/py-numpy/fix-undefined-functions-on-big-endian-systems.patch b/community/py-numpy/fix-undefined-functions-on-big-endian-systems.patch deleted file mode 100644 index 9a965c59ab..0000000000 --- a/community/py-numpy/fix-undefined-functions-on-big-endian-systems.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ec843c7008b3d89e6f6023b88ac0f1d02e39be17 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade <quantum.analyst@gmail.com> -Date: Sat, 11 Aug 2018 02:45:01 -0400 -Subject: [PATCH] BUG: Fix undefined functions on big-endian systems. - -Both these functions are used by `Dragon4_PrintFloat_IEEE_binary128`, -which was recently made available on big-endian systems without these -in #11568. ---- - numpy/core/src/multiarray/dragon4.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/numpy/core/src/multiarray/dragon4.c b/numpy/core/src/multiarray/dragon4.c -index abbf05220b1..2e599136efc 100644 ---- a/numpy/core/src/multiarray/dragon4.c -+++ b/numpy/core/src/multiarray/dragon4.c -@@ -114,7 +114,7 @@ LogBase2_64(npy_uint64 val) - return LogBase2_32((npy_uint32)val); - } - --#if defined(HAVE_LDOUBLE_IEEE_QUAD_LE) -+#if defined(HAVE_LDOUBLE_IEEE_QUAD_LE) || defined(HAVE_LDOUBLE_IEEE_QUAD_BE) - static npy_uint32 - LogBase2_128(npy_uint64 hi, npy_uint64 lo) - { -@@ -217,7 +217,8 @@ BigInt_Set_uint64(BigInt *i, npy_uint64 val) - - #if (defined(HAVE_LDOUBLE_IBM_DOUBLE_DOUBLE_LE) || \ - defined(HAVE_LDOUBLE_IBM_DOUBLE_DOUBLE_BE) || \ -- defined(HAVE_LDOUBLE_IEEE_QUAD_LE)) -+ defined(HAVE_LDOUBLE_IEEE_QUAD_LE) || \ -+ defined(HAVE_LDOUBLE_IEEE_QUAD_BE)) - static void - BigInt_Set_2x_uint64(BigInt *i, npy_uint64 hi, npy_uint64 lo) - { diff --git a/community/py-numpy/numpy-1.11.0-musl.patch b/community/py-numpy/numpy-1.11.0-musl.patch deleted file mode 100644 index da289f6407..0000000000 --- a/community/py-numpy/numpy-1.11.0-musl.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- numpy-1.11.0.orig/numpy/core/src/multiarray/numpyos.c -+++ numpy-1.11.0/numpy/core/src/multiarray/numpyos.c -@@ -15,7 +15,7 @@ - - #ifdef HAVE_STRTOLD_L - #include <stdlib.h> --#include <xlocale.h> -+#include <locale.h> - #endif diff --git a/community/py3-numpy/APKBUILD b/community/py3-numpy/APKBUILD new file mode 100644 index 0000000000..638ac5dc55 --- /dev/null +++ b/community/py3-numpy/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Contributor: Martell Malone <martellmalone@gmail.com> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py3-numpy +_pkgname=numpy +pkgver=1.17.0 +pkgrel=0 +pkgdesc="Scientific tools for Python" +url="https://www.numpy.org/" +arch="all" +license="BSD-3-Clause" +options="!check" +replaces="py-numpy" +makedepends="python3-dev cython openblas-dev>=0.3.0 + gfortran py3-nose libbsd-dev" +subpackages="$pkgname-dev + $pkgname-doc + $pkgname-f2py::noarch" +source="https://github.com/numpy/numpy/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz + numpy-1.17.0-musl.patch + site.cfg" +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + default_prepare + cp "$srcdir"/site.cfg "$builddir"/ +} + +build() { + export Atlas=None + LDFLAGS="$LDFLAGS -shared" + python3 setup.py build config_fc --fcompiler=gnu95 +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" \ + config_fc --fcompiler=gnu95 + + install -D -m 644 LICENSE.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +f2py() { + pkgdesc="f2py for numpy (for python3)" + depends="py3-numpy=$pkgver-r$pkgrel python3-dev" + install_if="$pkgname-f2py=$pkgver-r$pkgrel python3" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/f2py* "$subpkgdir"/usr/bin/ +} + +sha512sums="24ed1c509c483e86c10ed8ed63d3a6efb3fc46eaf1bbbd0712e231a546c6ff80750cdd11f7e4a8a59848425a050f8f7fa358fcb665d3bcf3b878aedbdfb8f7b5 numpy-1.17.0.tar.gz +f9f2a89ad4409b14e2b46acedadfc5e8d79a749af6cad3c8d168bcaf21ca4379cd03be95f22485c35b41114604599bbeb9adaa96dff4194b01dc73e90c04a29f numpy-1.17.0-musl.patch +21ca8db304cbbf5949f07702f2a42bb5e5a0d641921e36649555a41b0e48f04e96f53760417823177ac27f6de24b2191e6e1d5f0eb393beafa29f7484e23284f site.cfg" diff --git a/community/py3-numpy/numpy-1.17.0-musl.patch b/community/py3-numpy/numpy-1.17.0-musl.patch new file mode 100644 index 0000000000..16265786f8 --- /dev/null +++ b/community/py3-numpy/numpy-1.17.0-musl.patch @@ -0,0 +1,39 @@ +diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h +index 44cdffd..f120094 100644 +--- a/numpy/core/include/numpy/npy_endian.h ++++ b/numpy/core/include/numpy/npy_endian.h +@@ -12,7 +12,7 @@ + #if defined(NPY_HAVE_ENDIAN_H) + #include <endian.h> + #elif defined(NPY_HAVE_SYS_ENDIAN_H) +- #include <sys/endian.h> ++ #include <bsd/sys/endian.h> + #endif + + #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && defined(LITTLE_ENDIAN) +diff --git a/numpy/core/setup.py b/numpy/core/setup.py +index 3385027..976e782 100644 +--- a/numpy/core/setup.py ++++ b/numpy/core/setup.py +@@ -290,7 +290,7 @@ def check_types(config_cmd, ext, build_dir): + if res: + private_defines.append(('HAVE_ENDIAN_H', 1)) + public_defines.append(('NPY_HAVE_ENDIAN_H', 1)) +- res = config_cmd.check_header("sys/endian.h") ++ res = config_cmd.check_header("bsd/sys/endian.h") + if res: + private_defines.append(('HAVE_SYS_ENDIAN_H', 1)) + public_defines.append(('NPY_HAVE_SYS_ENDIAN_H', 1)) +diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py +index 307fab3..916a216 100644 +--- a/numpy/core/setup_common.py ++++ b/numpy/core/setup_common.py +@@ -120,7 +120,7 @@ OPTIONAL_HEADERS = [ + "emmintrin.h", # SSE2 + "immintrin.h", # AVX + "features.h", # for glibc version linux +- "xlocale.h", # see GH#8367 ++ "locale.h", # see GH#8367 + "dlfcn.h", # dladdr + "sys/mman.h", #madvise + ] diff --git a/community/py-numpy/site.cfg b/community/py3-numpy/site.cfg index effb46f110..effb46f110 100644 --- a/community/py-numpy/site.cfg +++ b/community/py3-numpy/site.cfg |