archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-scikit-learn / repos / community-x86_64 / PKGBUILD
blobc865c333c2cf2e0c1ba5f11e86a9f0b08f9eb3d2
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 # Contributor: Andrzej Giniewicz <gginiu@gmail.com>
5 pkgname=python-scikit-learn
6 pkgver=1.2.2
7 pkgrel=3
8 pkgdesc='A set of python modules for machine learning and data mining'
9 arch=(x86_64)
10 url='https://scikit-learn.org'
11 _url='https://github.com/scikit-learn/scikit-learn'
12 license=(BSD)
13 depends=(python-joblib
14          python-numpy
15          python-scipy
16          python-threadpoolctl)
17 makedepends=(cython
18              openmp
19              python-{build,installer,wheel}
20              python-setuptools)
21 optdepends=('python-matplotlib: plotting capabilities')
22 options=(!emptydirs)
23 _archive="${pkgname#python-}-$pkgver"
24 source=("$_url/archive/$pkgver/$_archive.tar.gz")
25 sha256sums=('992694e21ce4285aab71b09939d3ed7e5ddb41b8803eb98e10aaba927b74bdf1')
27 prepare() {
28         cd $_archive
29         sed -i -E '/setuptools/s/<[0-9.]+//;/numpy/d' pyproject.toml
32 build() {
33         cd $_archive
34         python -m build -wn
37 package() {
38         cd $_archive
39         python -m installer -d "$pkgdir" dist/*.whl
40         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
41         # See FS#49651
42         install -d "$pkgdir/usr/share/doc/$pkgname/"
43         cp -r doc/tutorial "$pkgdir/usr/share/doc/$pkgname/tutorial"