summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBlair Bonnett2023-06-10 12:30:22 +0200
committerBlair Bonnett2023-06-10 12:30:22 +0200
commit75ff870e284cbe4d27045f3c190368a1ef923436 (patch)
tree89d618c0f90eac79c3c0e5423613377b9b7b1cfa /PKGBUILD
downloadaur-75ff870e284cbe4d27045f3c190368a1ef923436.tar.gz
Initial package: 0.5.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9bc5ac1064f5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Blair Bonnett <blair.bonnett@gmail.com>
+
+pkgname=python-lazrs
+pkgdesc="Python bindings for laz-rs (LAZ compression)"
+pkgver=0.5.0
+pkgrel=1
+url='https://github.com/laz-rs/laz-rs-python'
+arch=('x86_64')
+license=('MIT')
+
+depends=('gcc-libs' 'glibc' 'python')
+makedepends=('maturin' 'python-installer')
+
+_pypi=lazrs
+source=(
+ "https://files.pythonhosted.org/packages/source/${_pypi::1}/$_pypi/$_pypi-$pkgver.tar.gz"
+)
+sha256sums=(
+ '793359e94eb436b34877b4305570774f9b1bba34c4671238512b80b60456d9ce'
+)
+
+build() {
+ cd "$_pypi-$pkgver"
+ maturin build --release --locked --strip \
+ --interpreter /usr/bin/python \
+ --target "$CARCH-unknown-linux-gnu"
+}
+
+check() {
+ cd "$_pypi-$pkgver"
+ local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ python -m installer --destdir=test_dir "target/wheels/$_pypi-$pkgver-"*.whl
+ export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+ python -c 'import lazrs'
+}
+
+package() {
+ cd "$_pypi-$pkgver"
+ python -m installer --destdir="$pkgdir" "target/wheels/$_pypi-$pkgver-"*.whl
+ install -Dm644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
+}