summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbacb890a098a08a859c99e0132e42e34f09b49f (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
# Maintainer: bipin kumar <kbipinkumar@pm.me>

pkgname=python-ncls
_module=${pkgname#python-}
pkgver=0.0.68
pkgrel=2
pkgdesc="A wrapper for the nested containment list data structure. http://dx.doi.org/10.1093/bioinformatics/btz615"
arch=('x86_64')
url="https://github.com/biocore-ntnu/ncls"
license=('BSD-2')
depends=(
         'python'
         'python-numpy'
         'glibc'
         'python-setuptools'
        )
makedepends=(
             'python-setuptools-scm'
             'cython'
             'python-build'
             'python-installer'
             'python-wheel'
            )

options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz"
        "LICENSE"
        "cython3.patch")
sha256sums=('81aaa5abb123bb21797ed2f8ef921e20222db14a3ecbc61ccf447532f2b7ba93'
            '48186409eb1721726d28884f40346a8380a893e95a50bef75584e2e9c2d4fcd5'
            '80fbdf0c5c2a805c953df3c359d84e63bc801d14457ad5b8a6c140250ccec7d2')

prepare() {
    cp LICENSE "$_module-$pkgver"
    cp cython3.patch "$_module-$pkgver"
    rm "$_module-$pkgver"/ncls/src/{fncls.c,ncls.c,ncls32.c}
    # Set cython language_level to 3
    cd "$_module-$pkgver"
    patch -p1 < cython3.patch
    
}

build() {
    cd "$_module-$pkgver"
    python -m build --wheel --no-isolation
}

package() {
    cd "$_module-$pkgver"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}