summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlair Bonnett2023-06-10 10:57:50 +0200
committerBlair Bonnett2023-06-10 10:57:50 +0200
commitc7979efb9e5cf8e651d6772c714afcaadb27cc7e (patch)
tree32d1e36b71e5fe0b3106ec5a9e04d23095c3aea2
parentfcae2080489e3f1c809fbeec463239cafa746f5a (diff)
downloadaur-c7979efb9e5cf8e651d6772c714afcaadb27cc7e.tar.gz
Update to 2.4.1.
* Run tests. * Add optdepends.
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore8
-rw-r--r--CHANGELOG.md54
-rw-r--r--PKGBUILD83
-rw-r--r--modify_doc_conf.patch29
5 files changed, 150 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f639f0ae67c8..81d64a6409d6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,28 @@
pkgbase = python-laspy
pkgdesc = Pythonic interface for .LAS LIDAR files
- pkgver = 2.2.0
+ pkgver = 2.4.1
pkgrel = 1
url = https://github.com/laspy/laspy
changelog = CHANGELOG.md
arch = any
license = BSD
+ checkdepends = python-pytest
makedepends = git
- makedepends = python-m2r2
+ makedepends = python-myst-parser
makedepends = python-setuptools
makedepends = python-build
makedepends = python-installer
makedepends = python-wheel
makedepends = python-sphinx
- makedepends = python-sphinx_rtd_theme
depends = python-numpy
- source = python-laspy::git+https://github.com/laspy/laspy#commit=fbb2973?signed
+ optdepends = python-lazrs: LAZ and COPC support
+ optdepends = python-laszip: LAZ support
+ optdepends = python-pyproj: CRS support
+ optdepends = python-requests: COPC support over HTTPS
+ source = git+https://github.com/laspy/laspy#commit=a72e3b122?signed
+ source = modify_doc_conf.patch
validpgpkeys = 44B238524D21C5064D7081BD5022EF94BE848C51
sha256sums = SKIP
+ sha256sums = 6da3d9fff0c082f310380a862e7d4eb2de7735bf5078768bf846703564b153db
pkgname = python-laspy
diff --git a/.gitignore b/.gitignore
index 2ce0965b4c7f..3fd4824dec4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
-python-laspy/
-laspy-*/
-*.tar.*
+laspy/
+src/
+pkg/
+*.log
+python-laspy-*.pkg.tar*
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91b12e8f287f..dce05091060d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,55 @@
# Changelog
+## 2.4.1
+
+### Fixed
+- Removed spurious `print` in copc.py and compression.py
+
+---
+
+## 2.4.0
+
+## Added
+- `read_evlrs` option (default true) to `laspy.open`, `laspy.LasReader.__init__` and `laspy.LasHeader.read_from`
+ Which allows to skip reading the EVLRs when opening a file. This can be useful when
+ opening a LAS file from a non seekable source / where seeking is expensive as reading
+ EVLRs requires seeking to the end of the file.
+- Selective decompression feature that allows to select in a LAS 1.4 (fmt >= 6 && <= 10)
+ which fields should be decompressed allowing to save time by decompressing only the fields
+ that are needed. Works with LAZ and COPC files.
+
+## Changed
+- The internal point reader is lazily created when the first point is actually read
+
+## Fixed
+- LasAppender when input file's last chunk is complete
+- Handle redundant CSs in GeoKeyDirectoryVlr
+
+---
+
+## 2.3.0
+
+### Changed
+- EVLRs are now read during the file opening part.
+- EVLRs are now part of the `LasHeader` class, but are still accesible
+ via `LasReader.evlrs` or `LasData.evlrs.
+
+### Fixed
+- Fixed CRS parsing on fiels with both `GeoKeyDirectoryVlr` and `WktCoordinateSystemVlr` and the first one is empty
+- `LasHeader.parse_crs` also looks for the CRS VLRs in the EVLRs of the file.
+- Fixed `LasHeader.generating_software` and `LasHeader.system_id` being limited to 31
+ bytes instead of 32.
+- Fixed `laspy.convert` to ensure the returng `LasData.evlrs` is a `Vlrlist` and
+ no simply a `list`
+
+---
+
## 2.2.0
### Added
- Added support for querying COPC LAZ files via a new class `CopcReader`.
- Added new optional feature to support adding CRS / SRS to a LAS file from a `pyproj.CRS` as
- well as reading the CRS / SRS information from a LAS file to a `pyproj.CRS`.
+ well as reading the CRS / SRS information from a LAS file to a `pyproj.CRS`.
### Fixed
- Fixed support for stream / source that are not `seekable`.
@@ -28,14 +72,14 @@
## 2.2.0 beta 0
### Added
-- Added new optional feature to support adding CRS / SRS to a LAS file from a `pyproj.CRS` as
- well as reading the CRS / SRS information from a LAS file to a `pyproj.CRS`.
+- Added new optional feature to support adding CRS / SRS to a LAS file from a `pyproj.CRS` as
+ well as reading the CRS / SRS information from a LAS file to a `pyproj.CRS`.
### Changed
- Support for Python3.6 removed.
---
-
+
## 2.1.2
@@ -73,7 +117,7 @@
However, an encoding error will be raised when writing such files.
- `LasData.__getitem__` will now return a `LasData` when indexing with slice or numpy array.
`assert isinstance(las[[1, 2, 3, 4]], laspy.LasData)`
-
+
### Fixed
- Fix `PackedPointRecord.__len__` when array has no dim
- Fix scaled extra byte creation when the offsets/scales given to `ExtraBytesParam` where of type `list` or `tuple`
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"
}
diff --git a/modify_doc_conf.patch b/modify_doc_conf.patch
new file mode 100644
index 000000000000..6c284dac0100
--- /dev/null
+++ b/modify_doc_conf.patch
@@ -0,0 +1,29 @@
+--- docs/conf.py
++++ docs/conf.py
+@@ -53,7 +53,7 @@ m2r2 uses vulnerable version of mistune; use myst_parser instead.
+ "sphinx.ext.napoleon",
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.doctest",
+- "m2r2"
++ "myst_parser"
+ # 'sphinx_autodoc_typehints'
+ ]
+
+@@ -66,7 +66,7 @@ Configure markdown as a valid source.
+ # You can specify multiple suffix as a list of string:
+ #
+ # source_suffix = ['.rst', '.md']
+-source_suffix = ".rst"
++source_suffix = [".rst", ".md"]
+
+ # The master toctree document.
+ master_doc = "index"
+@@ -93,7 +93,7 @@ We are only building the manpage, so remove dependency on external theme.
+ # The theme to use for HTML and HTML Help pages. See the documentation for
+ # a list of builtin themes.
+ #
+-html_theme = "sphinx_rtd_theme"
++# html_theme = "sphinx_rtd_theme"
+
+ language = "en"
+