git: c4a0dea7fdca - main - math/py-petsc4py: update 3.22.4 → 3.25.5
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Sep 2026 20:06:28 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c4a0dea7fdca9ff7b721f1b52e1ee4ecf87d42cb
commit c4a0dea7fdca9ff7b721f1b52e1ee4ecf87d42cb
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-10 03:14:58 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-10 19:58:20 +0000
math/py-petsc4py: update 3.22.4 → 3.25.5
---
math/py-petsc4py/Makefile | 9 ++-
math/py-petsc4py/distinfo | 6 +-
math/py-petsc4py/files/patch-conf_confpetsc.py | 10 ---
math/py-petsc4py/files/patch-cython | 101 -------------------------
4 files changed, 9 insertions(+), 117 deletions(-)
diff --git a/math/py-petsc4py/Makefile b/math/py-petsc4py/Makefile
index 02e3d809d75e..336a3f3b35fc 100644
--- a/math/py-petsc4py/Makefile
+++ b/math/py-petsc4py/Makefile
@@ -1,6 +1,5 @@
PORTNAME= petsc4py
-DISTVERSION= 3.22.4
-PORTREVISION= 3
+DISTVERSION= 3.25.5
CATEGORIES= math python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -19,10 +18,12 @@ LIB_DEPENDS= libpetsc.so:science/PETSc
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR}
USES= python
-USE_PYTHON= autoplist cython distutils pytest # tests fail to run, see https://gitlab.com/petsc/petsc/-/issues/1301
+USE_PYTHON= autoplist cython distutils pytest
MAKE_ENV= PETSC_DIR=${LOCALBASE}
+TEST_ARGS= --ignore=demo -k 'not (testStdoutRedirect or testCompatMPI4PY)'
+
OPTIONS_SINGLE= MPI
OPTIONS_SINGLE_MPI= MPICH OPENMPI
OPTIONS_DEFAULT= MPICH
@@ -36,4 +37,6 @@ TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/petsc4py/lib/PETSc${PYTHON_SOABI}.so
+# tests as of 3.25.5: 6454 passed 2 deselected
+
.include <bsd.port.mk>
diff --git a/math/py-petsc4py/distinfo b/math/py-petsc4py/distinfo
index 23c372f27892..268a7c50ac9d 100644
--- a/math/py-petsc4py/distinfo
+++ b/math/py-petsc4py/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1741584563
-SHA256 (petsc4py-3.22.4.tar.gz) = c7bd4dee211bc651217ae2732c56afacd8ac349320049cdfaa2131d7621e6d09
-SIZE (petsc4py-3.22.4.tar.gz) = 427982
+TIMESTAMP = 1788944008
+SHA256 (petsc4py-3.25.5.tar.gz) = a542fcdcd9471f49e996ee251461a81bf0645e299701de45a9433adee94b4489
+SIZE (petsc4py-3.25.5.tar.gz) = 487194
diff --git a/math/py-petsc4py/files/patch-conf_confpetsc.py b/math/py-petsc4py/files/patch-conf_confpetsc.py
deleted file mode 100644
index b99139929eca..000000000000
--- a/math/py-petsc4py/files/patch-conf_confpetsc.py
+++ /dev/null
@@ -1,10 +0,0 @@
---- conf/confpetsc.py.orig 2026-04-12 03:48:08 UTC
-+++ conf/confpetsc.py
-@@ -694,7 +694,6 @@ class build_ext(_build_ext):
- (config_file, config_data),
- msg='writing %s' % config_file,
- verbose=self.verbose,
-- dry_run=self.dry_run,
- )
-
- def get_config_data(self, arch_list):
diff --git a/math/py-petsc4py/files/patch-cython b/math/py-petsc4py/files/patch-cython
deleted file mode 100644
index 2fb9419b9dbc..000000000000
--- a/math/py-petsc4py/files/patch-cython
+++ /dev/null
@@ -1,101 +0,0 @@
-Obtained from: https://gitlab.com/petsc/petsc/-/commit/87b0c9e1f4d83439f081eddd06cf19f419b1e4f9
-
---- conf/cyautodoc.py.orig 2025-01-29 22:17:46 UTC
-+++ conf/cyautodoc.py
-@@ -24,8 +24,9 @@ class ExpressionWriter(BaseExpressionWriter):
- self.visit(node.index)
- self.put(']')
-
-- def visit_UnicodeNode(self, node):
-- self.emit_string(node, '')
-+ if hasattr(BaseExpressionWriter, 'emit_string'):
-+ def visit_UnicodeNode(self, node):
-+ self.emit_string(node, '')
-
-
- class AnnotationWriter(ExpressionWriter, BaseAnnotationWriter):
---- src/petsc4py/PETSc/petscdm.pxi.orig 2025-01-29 22:17:46 UTC
-+++ src/petsc4py/PETSc/petscdm.pxi
-@@ -236,9 +236,12 @@ cdef inline PetscInt asBoundary(object boundary,
- PetscDMBoundaryType *_z) except -1:
- cdef PetscInt dim = 0
- cdef object x=None, y=None, z=None
-+ # Use `type(0)` instead of `int` to workaround
-+ # Cython 3.1 failing to interpret `int` as a type
-+ cdef type pyint = type(0)
- if boundary is None or \
- isinstance(boundary, str) or \
-- isinstance(boundary, int):
-+ isinstance(boundary, pyint):
- _x[0] = _y[0] = _z[0] = asBoundaryType(boundary)
- else:
- _x[0] = _y[0] = _z[0] = DM_BOUNDARY_NONE
---- src/petsc4py/PETSc/petscis.pxi.orig 2025-01-29 22:17:46 UTC
-+++ src/petsc4py/PETSc/petscis.pxi
-@@ -181,28 +181,6 @@ cdef class _IS_buffer:
- def __exit__(self, *exc):
- return self.exit()
-
-- # buffer interface (legacy)
--
-- cdef Py_ssize_t getbuffer(self, void **p) except -1:
-- cdef PetscInt n = 0
-- if p != NULL:
-- self.acquire()
-- p[0] = <void*>self.data
-- n = self.size
-- elif self.iset != NULL:
-- CHKERR(ISGetLocalSize(self.iset, &n))
-- return <Py_ssize_t>(<size_t>n*sizeof(PetscInt))
--
-- def __getsegcount__(self, Py_ssize_t *lenp):
-- if lenp != NULL:
-- lenp[0] = self.getbuffer(NULL)
-- return 1
--
-- def __getreadbuffer__(self, Py_ssize_t idx, void **p):
-- if idx != 0: raise SystemError(
-- "accessing non-existent buffer segment")
-- return self.getbuffer(p)
--
- # NumPy array interface (legacy)
-
- property __array_interface__:
---- src/petsc4py/PETSc/petscvec.pxi.orig 2025-01-29 22:17:46 UTC
-+++ src/petsc4py/PETSc/petscvec.pxi
-@@ -573,35 +573,6 @@ cdef class _Vec_buffer:
- def __exit__(self, *exc):
- return self.exit()
-
-- # buffer interface (legacy)
--
-- cdef Py_ssize_t getbuffer(self, void **p) except -1:
-- cdef PetscInt n = 0
-- if p != NULL:
-- self.acquire()
-- p[0] = <void*>self.data
-- n = self.size
-- elif self.vec != NULL:
-- CHKERR(VecGetLocalSize(self.vec, &n))
-- return <Py_ssize_t>(<size_t>n*sizeof(PetscScalar))
--
-- def __getsegcount__(self, Py_ssize_t *lenp):
-- if lenp != NULL:
-- lenp[0] = self.getbuffer(NULL)
-- return 1
--
-- def __getreadbuffer__(self, Py_ssize_t idx, void **p):
-- if idx != 0: raise SystemError(
-- "accessing non-existent buffer segment")
-- return self.getbuffer(p)
--
-- def __getwritebuffer__(self, Py_ssize_t idx, void **p):
-- if idx != 0: raise SystemError(
-- "accessing non-existent buffer segment")
-- if self.readonly: raise TypeError(
-- "Object is not writable.")
-- return self.getbuffer(p)
--
- # NumPy array interface (legacy)
-
- property __array_interface__: