git: 954ab31f55ba - main - science/py-scikit-learn: Upgrade port to 1.7.2

From: Michael Osipov <michaelo_at_FreeBSD.org>
Date: Thu, 30 Oct 2025 21:36:12 UTC
The branch main has been updated by michaelo:

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

commit 954ab31f55bab50ff87f2cd3838c63f9c415976b
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2025-10-28 21:06:31 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2025-10-30 21:36:05 +0000

    science/py-scikit-learn: Upgrade port to 1.7.2
    
    PR:             290649
    Approved by:    wen (maintainer)
    Differential Revision:  https://reviews.freebsd.org/D53432
    Release Notes:  https://scikit-learn.org/stable/whats_new/v1.7.html#release-notes-1-7
---
 science/py-scikit-learn/Makefile                   | 20 +++++++++-----------
 science/py-scikit-learn/distinfo                   |  6 +++---
 science/py-scikit-learn/files/patch-pyproject.toml | 11 +++++++++++
 3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/science/py-scikit-learn/Makefile b/science/py-scikit-learn/Makefile
index 48e776557e4e..1e77e50ed73c 100644
--- a/science/py-scikit-learn/Makefile
+++ b/science/py-scikit-learn/Makefile
@@ -1,9 +1,9 @@
 PORTNAME=	scikit-learn
-DISTVERSION=	1.4.0
-PORTREVISION=	1
+DISTVERSION=	1.7.2
 CATEGORIES=	science python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	scikit_learn-${DISTVERSION}
 
 MAINTAINER=	wen@FreeBSD.org
 COMMENT=	Machine learning algorithms for python
@@ -12,19 +12,17 @@ WWW=		https://scikit-learn.org/
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}joblib>0:devel/py-joblib@${PY_FLAVOR} \
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}joblib>=1.3.0:devel/py-joblib@${PY_FLAVOR} \
 		${PYNUMPY} \
-		${PYTHON_PKGNAMEPREFIX}scipy>=1.3.2:science/py-scipy@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}threadpoolctl>=0:devel/py-threadpoolctl@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}scipy>=1.10.0:science/py-scipy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}threadpoolctl>=3.2.0:devel/py-threadpoolctl@${PY_FLAVOR}
 RUN_DEPENDS:=	${BUILD_DEPENDS}
+BUILD_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}meson-python>=0.17.1:devel/meson-python@${PY_FLAVOR}
 
-USES=		fortran python localbase
-USE_PYTHON=	distutils autoplist cython
+USES=		fortran python localbase shebangfix
+USE_PYTHON=	autoplist cython3 pep517
 
-POST_PLIST=	fix-plist
-
-fix-plist: # https://github.com/scikit-learn/scikit-learn/issues/12681
-	@${REINPLACE_CMD} -e "s|lib/python.*/sklearn/datasets/tests/data/openml$$||" ${TMPPLIST}
+SHEBANG_FILES=	sklearn/_build_utils/version.py
 
 post-install: # strip binaries
 	@${STRIP_CMD} \
diff --git a/science/py-scikit-learn/distinfo b/science/py-scikit-learn/distinfo
index d36e630a9747..2f21dc52ebc2 100644
--- a/science/py-scikit-learn/distinfo
+++ b/science/py-scikit-learn/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1705575324
-SHA256 (scikit-learn-1.4.0.tar.gz) = d4373c984eba20e393216edd51a3e3eede56cbe93d4247516d205643c3b93121
-SIZE (scikit-learn-1.4.0.tar.gz) = 7706781
+TIMESTAMP = 1761685556
+SHA256 (scikit_learn-1.7.2.tar.gz) = 20e9e49ecd130598f1ca38a1d85090e1a600147b9c02fa6f15d69cb53d968fda
+SIZE (scikit_learn-1.7.2.tar.gz) = 7193136
diff --git a/science/py-scikit-learn/files/patch-pyproject.toml b/science/py-scikit-learn/files/patch-pyproject.toml
new file mode 100644
index 000000000000..7f238de2e52b
--- /dev/null
+++ b/science/py-scikit-learn/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig	2025-10-28 21:25:52 UTC
++++ pyproject.toml
+@@ -99,7 +99,7 @@ build-backend = "mesonpy"
+ requires = [
+     "meson-python>=0.16.0,<0.19.0",
+     "Cython>=3.0.10,<3.2.0",
+-    "numpy>=2,<2.4.0",
++    "numpy",
+     "scipy>=1.8.0,<1.17.0",
+ ]
+