Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Feb 2026 05:18:44 +0000
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 74028c11dc13 - main - devel/py-thinc: Use USE_PYTHON=cython
Message-ID:  <69818534.19635.47fd4dee@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=74028c11dc138ffd502c0e03d79084f81f00d612

commit 74028c11dc138ffd502c0e03d79084f81f00d612
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2026-02-03 04:44:46 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2026-02-03 05:09:46 +0000

    devel/py-thinc: Use USE_PYTHON=cython
    
    - Bump PORTREVISION for package change
---
 devel/py-thinc/Makefile                   |   4 +-
 devel/py-thinc/files/patch-cython         | 124 ++++++++++++++++++++++++++++++
 devel/py-thinc/files/patch-pyproject.toml |   7 +-
 devel/py-thinc/files/patch-setup.cfg      |   6 +-
 4 files changed, 136 insertions(+), 5 deletions(-)

diff --git a/devel/py-thinc/Makefile b/devel/py-thinc/Makefile
index 60d0dd224578..b6f6924c376a 100644
--- a/devel/py-thinc/Makefile
+++ b/devel/py-thinc/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	thinc
 PORTVERSION=	9.1.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI \
 		https://github.com/explosion/thinc/releases/download/release-v${PORTVERSION}/
@@ -35,7 +35,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}blis>=1.0.0<1.4.0:math/py-blis@${PY_FLAVOR}
 		${PYTHON_PKGNAMEPREFIX}wasabi>=0.8.1<1.2.0:textproc/py-wasabi@${PY_FLAVOR}
 
 USES=		python
-USE_PYTHON=	autoplist concurrent cython0 pep517
+USE_PYTHON=	autoplist concurrent cython pep517
 
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
diff --git a/devel/py-thinc/files/patch-cython b/devel/py-thinc/files/patch-cython
new file mode 100644
index 000000000000..f1dd6f8ef204
--- /dev/null
+++ b/devel/py-thinc/files/patch-cython
@@ -0,0 +1,124 @@
+--- thinc/backends/cblas.pxd.orig	2024-09-12 19:54:11 UTC
++++ thinc/backends/cblas.pxd
+@@ -2,21 +2,21 @@ ctypedef void (*sgemm_ptr)(bint transA, bint transB, i
+ 
+ ctypedef void (*sgemm_ptr)(bint transA, bint transB, int M, int N, int K,
+                            float alpha, const float* A, int lda, const float* B,
+-                           int ldb, float beta, float* C, int ldc) nogil
++                           int ldb, float beta, float* C, int ldc) noexcept nogil
+ ctypedef void (*dgemm_ptr)(bint transA, bint transB, int M, int N, int K,
+                            double alpha, const double* A, int lda, const double* B,
+-                           int ldb, double beta, double* C, int ldc) nogil
++                           int ldb, double beta, double* C, int ldc) noexcept nogil
+ 
+ 
+ ctypedef void (*saxpy_ptr)(int N, float alpha, const float* X, int incX,
+-                           float *Y, int incY) nogil
++                           float *Y, int incY) noexcept nogil
+ 
+ 
+ ctypedef void (*daxpy_ptr)(int N, double alpha, const double* X, int incX,
+-                           double *Y, int incY) nogil
++                           double *Y, int incY) noexcept nogil
+ 
+-ctypedef void (*sscal_ptr)(int N, float alpha, float* X, int incX) nogil
+-ctypedef void (*dscal_ptr)(int N, double alpha, double* X, int incX) nogil
++ctypedef void (*sscal_ptr)(int N, float alpha, float* X, int incX) noexcept nogil
++ctypedef void (*dscal_ptr)(int N, double alpha, double* X, int incX) noexcept nogil
+ 
+ # Forward-declaration of the BlasFuncs struct. This struct must be opaque, so
+ # that consumers of the CBlas class cannot become dependent on its size or
+@@ -34,15 +34,15 @@ cdef class CBlas:
+ #
+ # See https://github.com/explosion/thinc/pull/700 for more information.
+ 
+-cdef daxpy_ptr daxpy(CBlas cblas) nogil
+-cdef saxpy_ptr saxpy(CBlas cblas) nogil
+-cdef sgemm_ptr sgemm(CBlas cblas) nogil
+-cdef dgemm_ptr dgemm(CBlas cblas) nogil
+-cdef sscal_ptr sscal(CBlas cblas) nogil
+-cdef dscal_ptr dscal(CBlas cblas) nogil
+-cdef void set_daxpy(CBlas cblas, daxpy_ptr daxpy) nogil
+-cdef void set_saxpy(CBlas cblas, saxpy_ptr saxpy) nogil
+-cdef void set_sgemm(CBlas cblas, sgemm_ptr sgemm) nogil
+-cdef void set_dgemm(CBlas cblas, dgemm_ptr dgemm) nogil
+-cdef void set_sscal(CBlas cblas, sscal_ptr sscal) nogil
+-cdef void set_dscal(CBlas cblas, dscal_ptr dscal) nogil
++cdef daxpy_ptr daxpy(CBlas cblas) noexcept nogil
++cdef saxpy_ptr saxpy(CBlas cblas) noexcept nogil
++cdef sgemm_ptr sgemm(CBlas cblas) noexcept nogil
++cdef dgemm_ptr dgemm(CBlas cblas) noexcept nogil
++cdef sscal_ptr sscal(CBlas cblas) noexcept nogil
++cdef dscal_ptr dscal(CBlas cblas) noexcept nogil
++cdef void set_daxpy(CBlas cblas, daxpy_ptr daxpy) noexcept nogil
++cdef void set_saxpy(CBlas cblas, saxpy_ptr saxpy) noexcept nogil
++cdef void set_sgemm(CBlas cblas, sgemm_ptr sgemm) noexcept nogil
++cdef void set_dgemm(CBlas cblas, dgemm_ptr dgemm) noexcept nogil
++cdef void set_sscal(CBlas cblas, sscal_ptr sscal) noexcept nogil
++cdef void set_dscal(CBlas cblas, dscal_ptr dscal) noexcept nogil
+--- thinc/backends/cblas.pyx.orig	2024-09-12 19:54:11 UTC
++++ thinc/backends/cblas.pyx
+@@ -5,10 +5,10 @@ from libcpp.memory cimport make_shared
+ 
+ 
+ # Single- and double-precision wrappers for `blis.cy.scalv`
+-cdef void blis_sscal(int N, float alpha, float* X, int incX) nogil:
++cdef void blis_sscal(int N, float alpha, float* X, int incX) noexcept nogil:
+     blis.cy.scalv(blis.cy.NO_CONJUGATE, N, alpha, X, incX)
+ 
+-cdef void blis_dscal(int N, double alpha, double* X, int incX) nogil:
++cdef void blis_dscal(int N, double alpha, double* X, int incX) noexcept nogil:
+     blis.cy.scalv(blis.cy.NO_CONJUGATE, N, alpha, X, incX)
+ 
+ 
+@@ -36,38 +36,38 @@ cdef class CBlas:
+         funcs.dscal = blis_dscal
+         self.ptr = make_shared[BlasFuncs](funcs)
+ 
+-cdef daxpy_ptr daxpy(CBlas cblas) nogil:
++cdef daxpy_ptr daxpy(CBlas cblas) noexcept nogil:
+     return deref(cblas.ptr).daxpy
+ 
+-cdef saxpy_ptr saxpy(CBlas cblas) nogil:
++cdef saxpy_ptr saxpy(CBlas cblas) noexcept nogil:
+     return deref(cblas.ptr).saxpy
+ 
+-cdef sgemm_ptr sgemm(CBlas cblas) nogil:
++cdef sgemm_ptr sgemm(CBlas cblas) noexcept nogil:
+     return deref(cblas.ptr).sgemm
+ 
+-cdef dgemm_ptr dgemm(CBlas cblas) nogil:
++cdef dgemm_ptr dgemm(CBlas cblas) noexcept nogil:
+     return deref(cblas.ptr).dgemm
+ 
+-cdef sscal_ptr sscal(CBlas cblas) nogil:
++cdef sscal_ptr sscal(CBlas cblas) noexcept nogil:
+     return deref(cblas.ptr).sscal
+ 
+-cdef dscal_ptr dscal(CBlas cblas) nogil:
++cdef dscal_ptr dscal(CBlas cblas) noexcept nogil:
+     return deref(cblas.ptr).dscal
+ 
+-cdef void set_daxpy(CBlas cblas, daxpy_ptr daxpy) nogil:
++cdef void set_daxpy(CBlas cblas, daxpy_ptr daxpy) noexcept nogil:
+     deref(cblas.ptr).daxpy = daxpy
+ 
+-cdef void set_saxpy(CBlas cblas, saxpy_ptr saxpy) nogil:
++cdef void set_saxpy(CBlas cblas, saxpy_ptr saxpy) noexcept nogil:
+     deref(cblas.ptr).saxpy = saxpy
+ 
+-cdef void set_sgemm(CBlas cblas, sgemm_ptr sgemm) nogil:
++cdef void set_sgemm(CBlas cblas, sgemm_ptr sgemm) noexcept nogil:
+     deref(cblas.ptr).sgemm = sgemm
+ 
+-cdef void set_dgemm(CBlas cblas, dgemm_ptr dgemm) nogil:
++cdef void set_dgemm(CBlas cblas, dgemm_ptr dgemm) noexcept nogil:
+     deref(cblas.ptr).dgemm = dgemm
+ 
+-cdef void set_sscal(CBlas cblas, sscal_ptr sscal) nogil:
++cdef void set_sscal(CBlas cblas, sscal_ptr sscal) noexcept nogil:
+     deref(cblas.ptr).sscal = sscal
+ 
+-cdef void set_dscal(CBlas cblas, dscal_ptr dscal) nogil:
++cdef void set_dscal(CBlas cblas, dscal_ptr dscal) noexcept nogil:
+     deref(cblas.ptr).dscal = dscal
diff --git a/devel/py-thinc/files/patch-pyproject.toml b/devel/py-thinc/files/patch-pyproject.toml
index c542d52b4d61..adb6de99d79e 100644
--- a/devel/py-thinc/files/patch-pyproject.toml
+++ b/devel/py-thinc/files/patch-pyproject.toml
@@ -1,6 +1,11 @@
 --- pyproject.toml.orig	2024-09-12 19:54:11 UTC
 +++ pyproject.toml
-@@ -5,9 +5,9 @@ requires = [
+@@ -1,13 +1,13 @@ requires = [
+ [build-system]
+ requires = [
+     "setuptools",
+-    "cython>=0.25,<3.0",
++    "cython>=3.0",
      "murmurhash>=1.0.2,<1.1.0",
      "cymem>=2.0.2,<2.1.0",
      "preshed>=3.0.2,<3.1.0",
diff --git a/devel/py-thinc/files/patch-setup.cfg b/devel/py-thinc/files/patch-setup.cfg
index 5bfe8a4e5d17..1412ad5a7286 100644
--- a/devel/py-thinc/files/patch-setup.cfg
+++ b/devel/py-thinc/files/patch-setup.cfg
@@ -1,10 +1,12 @@
 --- setup.cfg.orig	2024-09-12 19:54:21 UTC
 +++ setup.cfg
-@@ -29,13 +29,13 @@ setup_requires = 
+@@ -28,14 +28,14 @@ setup_requires = 
+ include_package_data = true
  python_requires = >=3.9
  setup_requires = 
- 	cython>=0.25,<3.0
+-	cython>=0.25,<3.0
 -	numpy>=2.0.0,<3.0.0
++	cython>=3.0
 +	numpy>=0,<3.0.0
  	cymem>=2.0.2,<2.1.0
  	preshed>=3.0.2,<3.1.0


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69818534.19635.47fd4dee>