summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 31417a4048dc3dd45b2288558bad509476427278 (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
# Maintainer: taotieren <admin@taotieren.com>
# Contributor: devome <evinedeng@hotmail.com>

_pkgname=chroma-hnswlib
_pipname="${_pkgname//-/_}"
pkgname="python-${_pkgname}"
pkgver=0.8.2
pkgrel=1
pkgdesc="Chroma's fork of hnswlib - a header-only C++/python library for fast approximate nearest neighbors"
arch=($CARCH)
url="https://github.com/chroma-core/hnswlib"
provides=("python-hnswlib")
conflicts=("python-hnswlib")
license=('Apache-2.0')
depends=(
    glibc
    libgcc
    libstdc++
)
makedepends=(
    'git'
    'pybind11' 
    'python-numpy'
    'python-build' 
    'python-installer' 
    'python-setuptools' 
    'python-wheel'
)
source=("${_pkgname}::git+${url}.git#tag=${pkgver}")
sha256sums=('afe025adc97dca7ab99fdd1dbe482ec4f0a1ed2e52adcc85af255554dbc73dea')
prepare() {
    git -C "${srcdir}/${_pkgname}" clean -dfx  
}

build() {
    cd "${srcdir}/${_pkgname}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${_pkgname}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -Dm644 *.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
    install -Dm0644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}