pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/math/py-numpy



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Jan 15 17:50:34 UTC 2024

Modified Files:
        pkgsrc/math/py-numpy: Makefile distinfo
Added Files:
        pkgsrc/math/py-numpy/patches:
            patch-numpy_core_code__generators_generate__numpy__api.py
            patch-numpy_core_code__generators_generate__ufunc__api.py

Log Message:
py-numpy: fix build with Python 3.12

The upstream code has moved and changed and it's hard to see what/when,
but I've tried to make it match what upstream is doing now.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 pkgsrc/math/py-numpy/Makefile
cvs rdiff -u -r1.87 -r1.88 pkgsrc/math/py-numpy/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__numpy__api.py \
    pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__ufunc__api.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/py-numpy/Makefile
diff -u pkgsrc/math/py-numpy/Makefile:1.118 pkgsrc/math/py-numpy/Makefile:1.119
--- pkgsrc/math/py-numpy/Makefile:1.118 Thu Jan  4 22:06:13 2024
+++ pkgsrc/math/py-numpy/Makefile       Mon Jan 15 17:50:34 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.118 2024/01/04 22:06:13 adam Exp $
+# $NetBSD: Makefile,v 1.119 2024/01/15 17:50:34 wiz Exp $
 
 DISTNAME=      numpy-1.26.3
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -80,12 +80,14 @@ BUILDLINK_TRANSFORM.SunOS+= rm:-D__STDC_
 pre-configure:
        ${LN} -sf ${PREFIX}/bin/cython-${PYVERSSUFFIX} ${BUILDLINK_DIR}/bin/cython
 
+# Files don't exist with Python 3.12, so add '-f' to ${RM}
+# (Please check if this is still necessary after updates.)
 post-install:
-       ${RM} ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/command/config.py.orig
-       ${RM} ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/fcompiler/__init__.py.orig
-       ${RM} ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/fcompiler/g95.py.orig
-       ${RM} ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/fcompiler/gnu.py.orig
-       ${RM} ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/log.py.orig
+       ${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/command/config.py.orig
+       ${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/fcompiler/__init__.py.orig
+       ${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/fcompiler/g95.py.orig
+       ${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/fcompiler/gnu.py.orig
+       ${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/numpy/distutils/log.py.orig
        cd ${DESTDIR}${PREFIX}/bin && ${MV} f2py f2py-${PYVERSSUFFIX} || ${TRUE}
 
 # as of 1.26.1

Index: pkgsrc/math/py-numpy/distinfo
diff -u pkgsrc/math/py-numpy/distinfo:1.87 pkgsrc/math/py-numpy/distinfo:1.88
--- pkgsrc/math/py-numpy/distinfo:1.87  Thu Jan  4 22:06:13 2024
+++ pkgsrc/math/py-numpy/distinfo       Mon Jan 15 17:50:34 2024
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.87 2024/01/04 22:06:13 adam Exp $
+$NetBSD: distinfo,v 1.88 2024/01/15 17:50:34 wiz Exp $
 
 BLAKE2s (numpy-1.26.3.tar.gz) = 9d0b23c2d8a1866ae82302a00fe0e88078dd221a78379326e49b0042fe745348
 SHA512 (numpy-1.26.3.tar.gz) = 25556b41e2db9cfc52c1dfa61b05e4fc1b7b6df3b169f365375575d1146857fdb5ff91ca1508b968c296b7a06e5c6d95e82c41cdc3561587a46d3aa178f6305d
 Size (numpy-1.26.3.tar.gz) = 15679696 bytes
+SHA1 (patch-numpy_core_code__generators_generate__numpy__api.py) = 6b2ec1ec67408b9d20ec4917356f0b725e9ea266
+SHA1 (patch-numpy_core_code__generators_generate__ufunc__api.py) = 974bb5b9507fe404a3aacda9cf4176993f74e048
 SHA1 (patch-numpy_core_include_numpy_npy__common.h) = 354e336b98f634b6298d0b1d0e85ef1a9d240bff
 SHA1 (patch-numpy_core_setup.py) = 01f90b7eb700cfa51edded31498c2de4c3850848
 SHA1 (patch-numpy_core_src_common_mem__overlap.c) = 10d65c7f8ba740ce2bae5ad47ef3162cd2c5a40b

Added files:

Index: pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__numpy__api.py
diff -u /dev/null pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__numpy__api.py:1.1
--- /dev/null   Mon Jan 15 17:50:34 2024
+++ pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__numpy__api.py      Mon Jan 15 17:50:34 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-numpy_core_code__generators_generate__numpy__api.py,v 1.1 2024/01/15 17:50:34 wiz Exp $
+
+Do not call distutils code, for Python 3.12 compat.
+
+--- numpy/core/code_generators/generate_numpy_api.py.orig      2024-01-15 17:44:12.338306195 +0000
++++ numpy/core/code_generators/generate_numpy_api.py
+@@ -149,10 +149,7 @@ def generate_api(output_dir, force=False
+ 
+     sources = numpy_api.multiarray_api
+ 
+-    if (not force and not genapi.should_rebuild(targets, [numpy_api.__file__, __file__])):
+-        return targets
+-    else:
+-        do_generate_api(targets, sources)
++    do_generate_api(targets, sources)
+ 
+     return targets
+ 
Index: pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__ufunc__api.py
diff -u /dev/null pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__ufunc__api.py:1.1
--- /dev/null   Mon Jan 15 17:50:34 2024
+++ pkgsrc/math/py-numpy/patches/patch-numpy_core_code__generators_generate__ufunc__api.py      Mon Jan 15 17:50:34 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-numpy_core_code__generators_generate__ufunc__api.py,v 1.1 2024/01/15 17:50:34 wiz Exp $
+
+Do not call distutils code, for Python 3.12 compat.
+
+--- numpy/core/code_generators/generate_ufunc_api.py.orig      2024-01-15 17:44:22.009704598 +0000
++++ numpy/core/code_generators/generate_ufunc_api.py
+@@ -126,10 +126,7 @@ def generate_api(output_dir, force=False
+ 
+     sources = ['ufunc_api_order.txt']
+ 
+-    if (not force and not genapi.should_rebuild(targets, sources + [__file__])):
+-        return targets
+-    else:
+-        do_generate_api(targets, sources)
++    do_generate_api(targets, sources)
+ 
+     return targets
+ 



Home | Main Index | Thread Index | Old Index