From 679c74eeb52d16eb35e5cfce180d32fca6d5cf13 Mon Sep 17 00:00:00 2001 From: Mehdi Chinoune Date: Fri, 30 Jun 2023 12:19:20 +0000 Subject: [PATCH] python-scikit-learn: update to 1.3.0 --- .../001-mingw-python-openmp-flag.patch | 6 +++--- .../002-openmp-cleanup-wait.patch | 12 ++++++------ .../004-unpin-numpy-version.patch | 11 +++++++++++ mingw-w64-python-scikit-learn/PKGBUILD | 19 +++++++++++-------- 4 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 mingw-w64-python-scikit-learn/004-unpin-numpy-version.patch diff --git a/mingw-w64-python-scikit-learn/001-mingw-python-openmp-flag.patch b/mingw-w64-python-scikit-learn/001-mingw-python-openmp-flag.patch index 34b5f834c1..e0305f6bde 100644 --- a/mingw-w64-python-scikit-learn/001-mingw-python-openmp-flag.patch +++ b/mingw-w64-python-scikit-learn/001-mingw-python-openmp-flag.patch @@ -1,9 +1,9 @@ --- a/sklearn/_build_utils/openmp_helpers.py +++ b/sklearn/_build_utils/openmp_helpers.py -@@ -18,7 +18,7 @@ - else: - compiler = compiler.__class__.__name__ +@@ -13,7 +13,7 @@ + + def get_openmp_flag(): - if sys.platform == "win32": + if sys.platform == "win32" and 'MSC' in sys.version: return ["/openmp"] diff --git a/mingw-w64-python-scikit-learn/002-openmp-cleanup-wait.patch b/mingw-w64-python-scikit-learn/002-openmp-cleanup-wait.patch index 5310cfa572..c76b5066a7 100644 --- a/mingw-w64-python-scikit-learn/002-openmp-cleanup-wait.patch +++ b/mingw-w64-python-scikit-learn/002-openmp-cleanup-wait.patch @@ -1,14 +1,14 @@ --- a/sklearn/_build_utils/pre_build_helpers.py +++ b/sklearn/_build_utils/pre_build_helpers.py -@@ -3,6 +3,7 @@ - import os +@@ -6,6 +6,7 @@ import sys - import glob -+import time import tempfile import textwrap - import subprocess -@@ -61,6 +61,7 @@ ++import time + + from setuptools.command.build_ext import customize_compiler, new_compiler + +@@ -54,6 +54,7 @@ raise finally: os.chdir(start_dir) diff --git a/mingw-w64-python-scikit-learn/004-unpin-numpy-version.patch b/mingw-w64-python-scikit-learn/004-unpin-numpy-version.patch new file mode 100644 index 0000000000..b68d77f1be --- /dev/null +++ b/mingw-w64-python-scikit-learn/004-unpin-numpy-version.patch @@ -0,0 +1,11 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -14,7 +14,7 @@ + # oldest supported NumPy is defined as 1.21.6. We therefore need to force + # it for this specific configuration. For details, see + # https://github.com/scipy/scipy/blob/c58b608c83d30800aceee6a4dab5c3464cb1de7d/pyproject.toml#L38-L41 +- "numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'", ++ "numpy", + + "scipy>=1.5.0", + ] diff --git a/mingw-w64-python-scikit-learn/PKGBUILD b/mingw-w64-python-scikit-learn/PKGBUILD index 16a172ef55..fff6d91cc1 100644 --- a/mingw-w64-python-scikit-learn/PKGBUILD +++ b/mingw-w64-python-scikit-learn/PKGBUILD @@ -6,11 +6,11 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.2.2 +pkgver=1.3.0 pkgrel=1 pkgdesc="A set of python modules for machine learning and data mining (mingw-w64)" arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64') url='https://scikit-learn.org' license=('spdx:BSD-3-Clause') depends=("${MINGW_PACKAGE_PREFIX}-python" @@ -27,11 +27,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz" 001-mingw-python-openmp-flag.patch 002-openmp-cleanup-wait.patch - 003-Fix-optimization-flag.patch) -sha256sums=('8429aea30ec24e7a8c7ed8a3fa6213adf3814a6efbea09e16e0a0c71e1a1a3d7' - '7817f0ac38fd47fb5731abf6ba76f0e8d6534f98e085048d0bc9cb5e402c8d43' - 'b9e8d52dd9f989c8b75c086653690598f28378451fbd7078e8163bff1d76452e' - '653f294ec5185ff2df98144e67327ed85ba5412e29e8e5b936074894025ba540') + 003-Fix-optimization-flag.patch + 004-unpin-numpy-version.patch) +sha256sums=('8be549886f5eda46436b6e555b0e4873b4f10aa21c07df45c4bc1735afbccd7a' + '8ec903dec6dbe788e24d3d7e800f933d6380329d6427c1873947aac7d5a74023' + '88c35335818321275e5d8b1a851d967faff48ad628c0dd5954e955689cc5d6b9' + '653f294ec5185ff2df98144e67327ed85ba5412e29e8e5b936074894025ba540' + 'd663fa43506a22172714826c55d8014176762ee9b4fe325b2f257e835c106fe1') apply_patch_with_msg() { for _patch in "$@" @@ -46,7 +48,8 @@ prepare() { apply_patch_with_msg \ 001-mingw-python-openmp-flag.patch \ 002-openmp-cleanup-wait.patch \ - 003-Fix-optimization-flag.patch + 003-Fix-optimization-flag.patch \ + 004-unpin-numpy-version.patch cd ${srcdir} rm -rf python-build-${MSYSTEM} | true