# Maintainer: Caleb Maclennan # Maintainer: Bruno Pagani # Contributor: Andrzej Giniewicz pkgname=python-scikit-learn pkgver=1.2.2 pkgrel=3 pkgdesc='A set of python modules for machine learning and data mining' arch=(x86_64) url='https://scikit-learn.org' _url='https://github.com/scikit-learn/scikit-learn' license=(BSD) depends=(python-joblib python-numpy python-scipy python-threadpoolctl) makedepends=(cython openmp python-{build,installer,wheel} python-setuptools) optdepends=('python-matplotlib: plotting capabilities') options=(!emptydirs) _archive="${pkgname#python-}-$pkgver" source=("$_url/archive/$pkgver/$_archive.tar.gz") sha256sums=('992694e21ce4285aab71b09939d3ed7e5ddb41b8803eb98e10aaba927b74bdf1') prepare() { cd $_archive sed -i -E '/setuptools/s/<[0-9.]+//;/numpy/d' pyproject.toml } build() { cd $_archive python -m build -wn } package() { cd $_archive python -m installer -d "$pkgdir" dist/*.whl install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING # See FS#49651 install -d "$pkgdir/usr/share/doc/$pkgname/" cp -r doc/tutorial "$pkgdir/usr/share/doc/$pkgname/tutorial" }