Files
MINGW-packages/mingw-w64-python-imbalanced-learn/PKGBUILD
2022-12-10 07:01:06 +01:00

49 lines
1.9 KiB
Bash

# Maintainer: Peter Budai <peterbudai@hotmail.com>
_realname=imbalanced-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=0.10.0
pkgrel=1
pkgdesc="A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
url='https://github.com/scikit-learn-contrib/imbalanced-learn'
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-joblib"
"${MINGW_PACKAGE_PREFIX}-python-numpy"
"${MINGW_PACKAGE_PREFIX}-python-scikit-learn"
"${MINGW_PACKAGE_PREFIX}-python-scipy"
"${MINGW_PACKAGE_PREFIX}-python-threadpoolctl")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-cython")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-keras"
"${MINGW_PACKAGE_PREFIX}-python-tensoflow")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/scikit-learn-contrib/${_realname}/archive/${pkgver}.tar.gz")
sha256sums=('5e3771d1733f49ed9a975139f7b0cc76f88ff90d2987f3f82dc61e94e54cf711')
prepare() {
cd "${srcdir}"
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
}
build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python setup.py build
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -D LICENSE "$pkgdir"/${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE
}