Files
MINGW-packages/mingw-w64-python-scikit-learn/PKGBUILD
Christoph Reiter 8519df2bf9 Move all reverse dependencies to cython0
Which is what they used up to now, so rebuilds don't break.
We can rebuild them against cython v3 later.
2023-10-22 19:52:17 +02:00

78 lines
2.8 KiB
Bash

# Maintainer: Peter Budai <peterbudai@hotmail.com>
_realname=scikit-learn
pkgbase=mingw-w64-python-${_realname}
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.3.1
pkgrel=1
pkgdesc="A set of python modules for machine learning and data mining (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'pypi: scikit-learn'
)
url='https://scikit-learn.org'
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-numpy"
"${MINGW_PACKAGE_PREFIX}-python-scipy"
"${MINGW_PACKAGE_PREFIX}-python-joblib"
"${MINGW_PACKAGE_PREFIX}-python-threadpoolctl")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel"
"${MINGW_PACKAGE_PREFIX}-cython0"
"${MINGW_PACKAGE_PREFIX}-cc")
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
004-unpin-numpy-version.patch)
sha256sums=('1a231cced3ee3fa04756b4a7ab532dc9417acd581a330adff5f2c01ac2831fcf'
'8ec903dec6dbe788e24d3d7e800f933d6380329d6427c1873947aac7d5a74023'
'88c35335818321275e5d8b1a851d967faff48ad628c0dd5954e955689cc5d6b9'
'653f294ec5185ff2df98144e67327ed85ba5412e29e8e5b936074894025ba540'
'd663fa43506a22172714826c55d8014176762ee9b4fe325b2f257e835c106fe1')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
prepare() {
cd ${_realname}-${pkgver}
apply_patch_with_msg \
001-mingw-python-openmp-flag.patch \
002-openmp-cleanup-wait.patch \
003-Fix-optimization-flag.patch \
004-unpin-numpy-version.patch
cd ${srcdir}
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 COPYING "${pkgdir}"${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE
install -d ${pkgdir}${MINGW_PREFIX}/share/doc/python-${_realname}
cp -r doc/tutorial ${pkgdir}${MINGW_PREFIX}/share/doc/python-${_realname}/tutorial
}