python-hdbscan: use git repo as source

This commit is contained in:
kbipinkumar 2024-12-28 02:00:08 +05:30
parent 88a9b1df07
commit 8485a0d6da
No known key found for this signature in database
GPG key ID: C67233497C15E476

View file

@ -2,20 +2,24 @@
# Maintainer: peippo <christoph+aur@christophfink.com>
pkgname="python-hdbscan"
_name=${pkgname#python-}
pkgdesc="Hierarchical Density-Based Spatial Clustering of Applications with Noise"
url="http://github.com/scikit-learn-contrib/hdbscan"
pkgver=0.8.39
pkgver=0.8.40
pkgrel=1
arch=("x86_64")
license=("BSD")
license=("BSD-3-Clause")
makedepends=(
"python-setuptools"
"cython"
"python-wheel"
"python-build"
"python-installer"
"git"
)
depends=(
"python"
"python-numpy"
@ -25,19 +29,25 @@ depends=(
"python-six"
)
source=(
"https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
)
sha256sums=('2aa1351f42fa79efdc47d53695381aa9a2efef6d1855b96c42d030646fee74f7')
_name=${pkgname#python-}
_tag=release-${pkgver}
source=("${_name}::git+https://github.com/scikit-learn-contrib/hdbscan.git#tag=${_tag}")
sha256sums=('258ddb88c9bf7380c1d7e59f2ce0125a98e99b4586a817fa1c791afb1f2577c6')
prepare() {
git -C "${srcdir}/${_name}" clean -dfx
}
build() {
cd "${srcdir}"/${_name}-${pkgver}
python setup.py build
cd "${srcdir}"/${_name}
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py install --root="${pkgdir}" --optimize=1
cd "${srcdir}"/${_name}
python -m installer --destdir="$pkgdir" dist/*.whl
rm "$pkgdir"/usr/dist_metrics.pxd
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}