Wednesday, April 01, 2020

Re: WIP: Update of math/py-numpy to 1.16.5

On Sun, Mar 29, 2020 at 03:38:33PM +0100, Stuart Henderson wrote:
> On 2020/03/29 11:49, Christian Weisgerber wrote:
> > On 2020-03-28, Stuart Henderson <stu@spacehopper.org> wrote:
> >
> > >> > Can somenoe commit the numpy update as well then?
> > >>
> > >> I am about to start a test bulk build on i386 with this.
> > >
> > > No build problems relating to the numpy update.
> >
> > Meanwhile, the existing port (1.14.6p2) errored out in my latest bulk
> > build:
> >
> > numpy/core/src/multiarray/temp_elide.c:87:10: fatal error: execinfo.h: No such file or directory
> > #include <execinfo.h>
> > ^~~~~~~~~~~~
> > compilation terminated.
> >
> > Please check that the updated port doesn't haphazardly pick up
> > execinfo too.
> >
> > --
> > Christian "naddy" Weisgerber naddy@mips.inka.de
> >
>
> It will need this or an alternative. (Unless we can either get the
> backtrace functions into libc, or remove the libexecinfo port ;-)

Here is a final diff that incorporates jca's patch and sthen's. OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/math/py-numpy/Makefile,v
retrieving revision 1.57
diff -u -p -u -p -r1.57 Makefile
--- Makefile 10 Mar 2020 03:31:45 -0000 1.57
+++ Makefile 1 Apr 2020 18:28:16 -0000
@@ -2,11 +2,10 @@

COMMENT= fast array and numeric programming library for Python

-MODPY_EGG_VERSION= 1.14.6
+MODPY_EGG_VERSION= 1.16.5
DISTNAME= numpy-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
EXTRACT_SUFX= .zip
-REVISION= 2

CATEGORIES= math devel

@@ -15,7 +14,8 @@ HOMEPAGE= https://www.numpy.org/
# BSD
PERMIT_PACKAGE = Yes

-WANTLIB= blas lapack m pthread ${MODFORTRAN_WANTLIB} ${MODPY_WANTLIB}
+WANTLIB += ${MODFORTRAN_WANTLIB} ${MODPY_WANTLIB}
+WANTLIB += blas cblas lapack m pthread

MODULES= lang/python \
fortran
@@ -27,13 +27,14 @@ MODPY_PI = Yes
MODPY_SETUPTOOLS= Yes
MODPY_DISTUTILS_BUILDARGS = --fcompiler=gnu95

-TEST_DEPENDS= devel/py-nose${MODPY_FLAVOR} \
- devel/py-tz${MODPY_FLAVOR}
-
+TEST_DEPENDS= ${FULLPKGNAME}:${FULLPKGPATH} \
+ devel/py-test${MODPY_FLAVOR} \
+ devel/py-tz${MODPY_FLAVOR}
MODFORTRAN_COMPILER = gfortran

BUILD_DEPENDS = ${MODFORTRAN_BUILD_DEPENDS}
-LIB_DEPENDS= math/lapack \
+LIB_DEPENDS= math/cblas \
+ math/lapack \
${MODFORTRAN_LIB_DEPENDS}

# Cython 0.28.* uses __attribute__((optimize("Os"))) which
@@ -54,7 +55,7 @@ pre-build:
cp -f ${WRKSRC}/numpy/distutils/site.cfg ${WRKSRC}/site.cfg

do-test:
- cd ${WRKDIR} && ${MAKE_ENV} PYTHONPATH=${WRKINST}${MODPY_SITEPKG} ${MODPY_BIN} -c \
+ cd ${WRKDIR} && ${MAKE_ENV} ${MODPY_BIN} -c \
'import numpy ; numpy.test()'

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/math/py-numpy/distinfo,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 distinfo
--- distinfo 26 Oct 2018 21:09:31 -0000 1.13
+++ distinfo 1 Apr 2020 18:28:16 -0000
@@ -1,2 +1,2 @@
-SHA256 (numpy-1.14.6.zip) = ElDt9vbEPh14I/CWdBa8GCWLsnHcU2KY6w6gCp5FuAo=
-SIZE (numpy-1.14.6.zip) = 4906096
+SHA256 (numpy-1.16.5.zip) = i7RS2U6WSzEiBbDeEjjdcgnaRSNDZTqyFLXWgXgOegw=
+SIZE (numpy-1.16.5.zip) = 5138208
Index: patches/patch-numpy_core_include_numpy_npy_common_h
===================================================================
RCS file: /cvs/ports/math/py-numpy/patches/patch-numpy_core_include_numpy_npy_common_h,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 patch-numpy_core_include_numpy_npy_common_h
--- patches/patch-numpy_core_include_numpy_npy_common_h 30 Jun 2018 21:49:33 -0000 1.6
+++ patches/patch-numpy_core_include_numpy_npy_common_h 1 Apr 2020 18:28:16 -0000
@@ -1,13 +1,8 @@
$OpenBSD: patch-numpy_core_include_numpy_npy_common_h,v 1.6 2018/06/30 21:49:33 daniel Exp $

-(1) optimize function attributes were added in gcc 4.4. Apply a fix for the warnings. But
-the next release of numpy should fix this in a better way. See:
-https://github.com/numpy/numpy/issues/5451
+XXX recheck powerpc, is this still needed?

-Gets rid of these warnings from the build:
-numpy/core/src/multiarray/lowlevel_strided_loops.c.src:120: warning: 'optimize' attribute directive ignored
-
-(2) py-numpy only checks for expl to determine whether extended-precision
+py-numpy only checks for expl to determine whether extended-precision
support is present. since we don't have it yet; it implements
it's own. however, on alpha, powerpc, it declared functions with
types that conflict with C99 (double for *l), therefore failed.
@@ -15,36 +10,7 @@ types that conflict with C99 (double for
Index: numpy/core/include/numpy/npy_common.h
--- numpy/core/include/numpy/npy_common.h.orig
+++ numpy/core/include/numpy/npy_common.h
-@@ -20,6 +20,7 @@
-

No comments:

Post a Comment