summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLuis Martinez2023-01-12 14:36:37 -0600
committerLuis Martinez2023-01-12 14:36:37 -0600
commit381ce2c5e97d2fc87465cf72273da05ca2ec9f88 (patch)
tree629f4db63626354dc78339d7b10d99047edf6478 /PKGBUILD
parent1e1750cbdb73f2da121970f4cbaa0b05d2a5d06c (diff)
downloadaur-python-seqlearn-git.tar.gz
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD53
1 files changed, 34 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7ce3e0ad6f97..a0dfac6124c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,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>
-_base=seqlearn
-pkgname=python-${_base}-git
+
+pkgname=python-seqlearn-git
+_pkg=seqlearn
pkgver=r89.32d4bfa
-pkgrel=1
-pkgdesc="A sequence classification toolkit for Python"
-arch=(any)
-url="https://github.com/larsmans/${_base}"
-license=('custom')
-depends=(python-scipy)
-makedepends=(cython python-setuptools git)
-source=(git+${url}.git)
-sha512sums=('SKIP')
+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 ${_base}
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ 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 ${_base}
- export PYTHONHASHSEED=0
- python setup.py build_ext --inplace
+ cd "$_pkg"
+ python -m build --wheel --no-isolation
}
package() {
- cd ${_base}
- PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
- install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ 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"
}