summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD83
1 files changed, 57 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f4f19c2f23e8..8248a7033bc8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,74 @@
-# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Maintainer: Blair Bonnett <blair dot bonnett at gmail dot com>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Kuan-Yen Chou <kuanyenchou at gmail dot com>
pkgname=python-laspy
-_pkg="${pkgname#python-}"
pkgdesc="Pythonic interface for .LAS LIDAR files"
url="https://github.com/laspy/laspy"
-pkgver=2.2.0
-_commit=fbb2973
+pkgver=2.4.1
pkgrel=1
arch=('any')
license=('BSD')
+changelog='CHANGELOG.md'
+
depends=('python-numpy')
+optdepends=(
+ 'python-lazrs: LAZ and COPC support'
+ 'python-laszip: LAZ support'
+ 'python-pyproj: CRS support'
+ 'python-requests: COPC support over HTTPS'
+)
makedepends=(
- 'git'
- 'python-m2r2'
- 'python-setuptools'
- 'python-build'
- 'python-installer'
- 'python-wheel'
- 'python-sphinx'
- 'python-sphinx_rtd_theme')
-changelog=CHANGELOG.md
-source=("$pkgname::git+$url#commit=$_commit?signed")
-sha256sums=('SKIP')
+ 'git'
+ 'python-myst-parser'
+ 'python-setuptools'
+ 'python-build'
+ 'python-installer'
+ 'python-wheel'
+ 'python-sphinx'
+)
+checkdepends=('python-pytest')
+
+_pyname=laspy
+_commit=a72e3b122
+source=(
+ "git+$url#commit=$_commit?signed"
+ 'modify_doc_conf.patch'
+)
+sha256sums=(
+ 'SKIP'
+ '6da3d9fff0c082f310380a862e7d4eb2de7735bf5078768bf846703564b153db'
+)
validpgpkeys=('44B238524D21C5064D7081BD5022EF94BE848C51')
+prepare() {
+ cd "$_pyname"
+
+ # Use myst_parser instead of m2r2 and disable the custom HTML theme.
+ patch -p0 -i "$srcdir/modify_doc_conf.patch"
+
+ # Replace the RST (which used an m2r2 directive) with a copy of the markdown.
+ cd docs
+ rm changelog.rst
+ ln -sf ../CHANGELOG.md changelog.md
+}
+
build() {
- cd "$pkgname"
- python -m build --wheel --no-isolation
- PYTHONPATH="$PWD" make -C docs man
+ cd "$_pyname"
+ python -m build --wheel --no-isolation
+ PYTHONPATH="$PWD" make -C docs man
+}
+
+check() {
+ cd "$_pyname"
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer "dist/$_pyname-$pkgver"-*.whl
+ test-env/bin/python -m pytest
}
package() {
- cd "$pkgname"
- PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
- install -Dm644 docs/_build/man/laspy.1 -t "$pkgdir/usr/share/man/man1/"
- local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
- install -d "$pkgdir/usr/share/licenses/$pkgname/"
- ln -s \
- "$_site/$_pkg-$pkgver.dist-info/LICENSE.txt" \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$_pyname"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" "dist/$_pyname-$pkgver"-*.whl
+ install -Dm644 docs/_build/man/laspy.1 -t "$pkgdir/usr/share/man/man1/"
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}