py3dtiles: init at 12.0.0

Co-authored-by: Ivan Mincik <ivan.mincik@gmail.com>
Co-authored-by: Augustin Trancart <augustin.trancart@gmail.com>
This commit is contained in:
phanirithvij
2026-02-05 11:19:24 +05:30
co-authored by Ivan Mincik Augustin Trancart
parent c8cadcc826
commit 987248f56a
3 changed files with 150 additions and 0 deletions
@@ -0,0 +1,146 @@
{
lib,
fetchpatch2,
fetchFromGitLab,
addBinToPathHook,
buildPythonPackage,
# build-system
setuptools,
setuptools-scm,
# dependencies
lz4,
mapbox-earcut,
numba,
numpy,
psutil,
pygltflib,
pyproj,
pyzmq,
# optional-dependencies
ifcopenshell,
lark,
laspy,
plyfile,
psycopg2-binary,
# tests
pytest-benchmark,
pytest-cov-stub,
pytestCheckHook,
writeText,
moreutils,
}:
buildPythonPackage (finalAttrs: {
pname = "py3dtiles";
version = "12.0.0";
pyproject = true;
src = fetchFromGitLab {
owner = "py3dtiles";
repo = "py3dtiles";
tag = "v${finalAttrs.version}";
hash = "sha256-m8c+g9XXbg9OSC+NNoQkw4RKXvNFRIPWkDjAs6oH3kc=";
};
patches = [
# Remove in the next version
# Patch to avoid using pythonRelaxDeps
(fetchpatch2 {
url = "https://gitlab.com/py3dtiles/py3dtiles/-/commit/0f60691434b9ad4afebec29b2eedfcbbe0b8420d.patch";
includes = [ "pyproject.toml" ];
hash = "sha256-TLoKeltI1xxSONX0uu56HKl2fXzAp1ufunsBPRr5Pus=";
})
];
build-system = [
setuptools
setuptools-scm
];
dependencies = [
lz4
mapbox-earcut
numba
numpy
psutil
pygltflib
pyproj
pyzmq
];
optional-dependencies = {
ifc = [
ifcopenshell
lark
];
las = [
laspy
];
ply = [
plyfile
];
postgres = [
psycopg2-binary
];
};
nativeCheckInputs = [
pytestCheckHook
pytest-benchmark
pytest-cov-stub
moreutils # chronic
];
checkInputs = with finalAttrs.passthru.optional-dependencies; ply ++ las ++ ifc;
nativeInstallCheckInputs = [
addBinToPathHook
];
# from .gitlab-ci.yml
# note: nativeCheckInputs are also available for installCheckPhase
# chronic - runs a command quietly unless it fails
installCheckPhase =
let
testScript = writeText "test.py" /* py */ ''
from py3dtiles.tileset.utils import number_of_points_in_tileset
from pathlib import Path
exit(number_of_points_in_tileset(Path("3dtiles/tileset.json")) != 22300)
'';
in
''
runHook preInstallCheck
chronic py3dtiles info tests/fixtures/pointCloudRGB.pnts
chronic py3dtiles convert --out test1 ./tests/fixtures/simple.xyz
chronic py3dtiles convert --out test2 ./tests/fixtures/with_srs_3857.las
chronic py3dtiles convert tests/fixtures/simple.ply
chronic python ${testScript}
runHook pytestCheckPhase
runHook postInstallCheck
'';
# disable benchmarks to reduce load on the builder
pytestFlags = [ "--benchmark-disable" ];
pythonImportsCheck = [
"py3dtiles"
];
meta = {
changelog = "https://py3dtiles.org/main/changelog.html";
description = "Python module to manage 3DTiles format";
downloadPage = "https://gitlab.com/py3dtiles/py3dtiles";
homepage = "https://py3dtiles.org";
license = lib.licenses.asl20;
mainProgram = "py3dtiles";
teams = with lib.teams; [
geospatial
ngi
];
};
})
+2
View File
@@ -3286,6 +3286,8 @@ with pkgs;
pulumiPackages = recurseIntoAttrs pulumi.pkgs;
py3dtiles = with python3Packages; toPythonApplication py3dtiles;
patch = gnupatch;
pcscliteWithPolkit = pcsclite.override {
+2
View File
@@ -12969,6 +12969,8 @@ self: super: with self; {
py3dns = callPackage ../development/python-modules/py3dns { };
py3dtiles = callPackage ../development/python-modules/py3dtiles { };
py3exiv2 = callPackage ../development/python-modules/py3exiv2 { inherit (pkgs) exiv2; };
py3langid = callPackage ../development/python-modules/py3langid { };