summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a0dfac6124c223c9845eb50d59c286b4942de682 (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
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Michal Wojdyla < micwoj9292 at gmail dot com >
# Contributor: Ashley Whetter <(firstname) @ awhetter.co.uk>

pkgname=python-seqlearn-git
_pkg=seqlearn
pkgver=r89.32d4bfa
pkgrel=2
pkgdesc="Sequence classification toolkit for Python"
arch=('x86_64')
url='https://github.com/larsmans/seqlearn'
license=('MIT')
depends=('python-scikit-learn')
makedepends=(
	'cython'
	'git'
	'python-build'
	'python-installer'
	'python-setuptools'
	'python-wheel')
source=("$_pkg::git+$url"
        'setup.py.patch')
sha256sums=('SKIP'
            'bf5d8bff54489ccd71a427a1a136527b7d913ca386c770bf2de7683d6bae9f16')

pkgver() {
	cd "$_pkg"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	patch -p1 -d "$_pkg" < setup.py.patch
}

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

package() {
	cd "$_pkg"
	python -m installer --destdir="$pkgdir" dist/*.whl
	local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
	install -dv "$pkgdir/usr/share/licenses/$pkgname/"
	ln -sv "$_site/$_pkg-0.2.dist-info/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}