blob: de608385e208a9a84c8003c5dcb284902b416a92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Maintainer: Anton Kudelin <kudelin at proton dot me>
_pyname=xgboost
pkgname=python-$_pyname
pkgver=2.1.0
pkgrel=1
pkgdesc="Gradient Boosting Library for Python"
arch=(x86_64 aarch64)
url="https://xgboost.ai"
license=(Apache-2.0)
depends=(python-scikit-learn python-pandas python-matplotlib python-pyarrow
python-graphviz python-dask)
makedepends=(python-build python-installer python-wheel python-hatchling
python-setuptools cmake ninja git)
optdepends=('apache-spark: Distributed XGBoost with PySpark' 'python-pytest')
provides=(python-$_pyname)
conflicts=(python-$_pyname-git)
source=($_pyname-$pkgver.tar.gz::https://github.com/dmlc/xgboost/archive/refs/tags/v$pkgver.tar.gz
git+https://github.com/dmlc/dmlc-core.git)
sha256sums=('380c66ac3611a9cc867d4f51aaa95bb8946f75a84e5a3f0a3f37b89a072e6f93'
'SKIP')
prepare() {
cd "$srcdir/$_pyname-$pkgver"
# Replacing the internal DMLC core with a stable one
rm -rf dmlc-core
ln -sf "$srcdir/dmlc-core" \
"$srcdir/$_pyname-$pkgver/dmlc-core"
}
build() {
cd "$srcdir"
cmake -B build -S $_pyname-$pkgver \
-D CMAKE_INSTALL_PREFIX=/usr \
-D USE_CXX14_IF_AVAILABLE=ON \
-D USE_OPENMP=ON \
-D PLUGIN_FEDERATED=ON \
-D Protobuf_PROTOC_EXECUTABLE=/usr/bin/protoc \
-D USE_PARQUET=ON \
-G Ninja \
-W no-dev
cmake --build build
cd $_pyname-$pkgver/python-package
python -m build \
--wheel \
--no-isolation \
--skip-dependency-check
}
package() {
cd "$srcdir/$_pyname-$pkgver/python-package"
python -m installer dist/*.whl \
--destdir="$pkgdir" \
--compile-bytecode=2
}
|