git: c81a6f0d3744 - main - textproc/py-gensim: update 4.3.3 → 4.4.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 10 Sep 2026 20:06:17 UTC
The branch main has been updated by yuri:

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

commit c81a6f0d3744ca9edaa27d3bb397cfb350985af2
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-10 00:00:07 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-10 19:58:18 +0000

    textproc/py-gensim: update 4.3.3 → 4.4.0
---
 textproc/py-gensim/Makefile                   | 30 +++++++++++++++++----------
 textproc/py-gensim/distinfo                   |  6 +++---
 textproc/py-gensim/files/patch-pyproject.toml | 12 -----------
 3 files changed, 22 insertions(+), 26 deletions(-)

diff --git a/textproc/py-gensim/Makefile b/textproc/py-gensim/Makefile
index a9d94c6f568e..778c0d0d66d0 100644
--- a/textproc/py-gensim/Makefile
+++ b/textproc/py-gensim/Makefile
@@ -1,24 +1,18 @@
 PORTNAME=	gensim
-DISTVERSION=	4.3.3
-PORTREVISION=	2
+DISTVERSION=	4.4.0
 CATEGORIES=	textproc python
-MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Python framework for fast Vector Space Modelling
 WWW=		https://radimrehurek.com/gensim/
 
-BROKEN=		fails to build with NumPy 2.x
-
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-DEPRECATED=	Depends on expired lang/cython0
-EXPIRATION_DATE=2026-09-15
-
 BUILD_DEPENDS=	${PY_SETUPTOOLS} \
 		${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scipy>=1.7.0:science/py-scipy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}scipy>=1.7.0:science/py-scipy@${PY_FLAVOR} \
@@ -27,13 +21,27 @@ TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVO
 		${PYTHON_PKGNAMEPREFIX}testfixtures>0:devel/py-testfixtures@${PY_FLAVOR}
 
 USES=		compiler:c++11-lang python
-USE_PYTHON=	autoplist cython0 pep517 pytest # tests fail unde PyTest, see https://github.com/RaRe-Technologies/gensim/issues/3561
+USE_PYTHON=	autoplist cython pep517 pytest
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	RaRe-Technologies
 
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 TEST_WRKSRC=	${WRKSRC}/gensim/test
+TEST_ARGS=	-k 'not (test_multipart_load or test_load_dataset)'
+
+# tests as of 4.4.0: 993 passed, 120 skipped, 2 deselected, 1 xfailed in 578.71s
+
+# Force regeneration of C/C++ sources from Cython; bundled .c/.cpp files are
+# stale and fail to compile with current Python.
+post-patch:
+	@${FIND} ${WRKSRC}/gensim \( -name "*.c" -o -name "*.cpp" \) -delete
 
-# python setup.py build_ext --inplace
-xPYDISTUTILS_BUILD_TARGET=	build_ext
+pre-test:
+	@for so in `${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/gensim -name '*.so'`; do \
+		target="$${so#${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/}" ; \
+		${CP} "$$so" "${WRKSRC}/$$target" ; \
+	done
 
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name "*.so" | ${XARGS} ${STRIP_CMD}
diff --git a/textproc/py-gensim/distinfo b/textproc/py-gensim/distinfo
index 4bcf9d5c8645..b6a5d8119c81 100644
--- a/textproc/py-gensim/distinfo
+++ b/textproc/py-gensim/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1726687146
-SHA256 (gensim-4.3.3.tar.gz) = 84852076a6a3d88d7dac5be245e24c21c3b819b565e14c1b61fa3e5ee76dcf57
-SIZE (gensim-4.3.3.tar.gz) = 23258708
+TIMESTAMP = 1788945407
+SHA256 (RaRe-Technologies-gensim-4.4.0_GH0.tar.gz) = 0c1c8984f18512aba04332b45dc58698ac277dfa1d314a190a3f07edc48c31ac
+SIZE (RaRe-Technologies-gensim-4.4.0_GH0.tar.gz) = 60364428
diff --git a/textproc/py-gensim/files/patch-pyproject.toml b/textproc/py-gensim/files/patch-pyproject.toml
deleted file mode 100644
index 3e51c0907ad0..000000000000
--- a/textproc/py-gensim/files/patch-pyproject.toml
+++ /dev/null
@@ -1,12 +0,0 @@
---- pyproject.toml.orig	2024-07-19 13:32:36 UTC
-+++ pyproject.toml
-@@ -7,8 +7,7 @@ requires = [
-     "Cython>=0.29.32,<3.0.0",
-     # oldest supported Numpy for this platform is 1.17 but the oldest supported by Gensim
-     # is 1.18.5, remove the line when they increase oldest supported Numpy for this platform
--    "numpy==1.18.5; python_version=='3.8' and platform_machine not in 'arm64|aarch64'",
--    "oldest-supported-numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'",
-+    "numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'",
-     "setuptools",
-     "wheel",
- ]