* Remove unused deps * Add missing direct deps for build backends * Remove pdm-pep517, got replaced by pdm-backend and has no users anymore
67 lines
2.3 KiB
Bash
67 lines
2.3 KiB
Bash
# Maintainer: Peter Budai <peterbudai@hotmail.com>
|
|
|
|
_realname=scikit-learn
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=1.8.0
|
|
pkgrel=2
|
|
pkgdesc="A set of python modules for machine learning and data mining (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://scikit-learn.org'
|
|
msys2_repository_url="https://github.com/scikit-learn/scikit-learn"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/scikit-learn'
|
|
"cpe: cpe:/a:scikit-learn:scikit-learn"
|
|
)
|
|
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"
|
|
"${MINGW_PACKAGE_PREFIX}-cc-libs"
|
|
"${MINGW_PACKAGE_PREFIX}-omp")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-meson-python"
|
|
"${MINGW_PACKAGE_PREFIX}-ninja"
|
|
"${MINGW_PACKAGE_PREFIX}-pkgconf"
|
|
"${MINGW_PACKAGE_PREFIX}-cython"
|
|
"${MINGW_PACKAGE_PREFIX}-cc")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz"
|
|
001-remove-extra-flags.patch)
|
|
sha256sums=('9bccbb3b40e3de10351f8f5068e105d0f4083b1a65fa07b6634fbc401a6287fd'
|
|
'bc1dd1784447b20beb53de471ee1347a4ae4d423f073d1ab4554c923264c8be1')
|
|
|
|
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-remove-extra-flags.patch
|
|
}
|
|
|
|
build() {
|
|
cp -r "${_realname/-/_}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation \
|
|
-Csetup-args="-Dbuildtype=release"
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
find "${pkgdir}${MINGW_PREFIX}" -name '*.dll.a' -delete
|
|
|
|
install -Dm644 COPYING "${pkgdir}"${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE
|
|
}
|