Files
2025-10-28 07:49:26 +00:00

106 lines
1.8 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
pythonOlder,
numpy,
lxml,
trimesh,
# optional deps
colorlog,
manifold3d,
charset-normalizer,
jsonschema,
networkx,
svg-path,
pycollada,
shapely,
xxhash,
rtree,
httpx,
scipy,
pillow,
mapbox-earcut,
}:
buildPythonPackage rec {
pname = "trimesh";
version = "4.9.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "mikedh";
repo = "trimesh";
tag = version;
hash = "sha256-HOSmV55RRZkIk1YppWfYvSm0hURSKUsDeeWtVBrH7Rs=";
};
build-system = [ setuptools ];
dependencies = [ numpy ];
optional-dependencies = {
easy = [
colorlog
manifold3d
charset-normalizer
lxml
jsonschema
networkx
svg-path
pycollada
shapely
xxhash
rtree
httpx
scipy
pillow
# vhacdx # not packaged
mapbox-earcut
# embreex # not packaged
];
};
nativeCheckInputs = [
lxml
pytestCheckHook
];
disabledTests = [
# requires loading models which aren't part of the Pypi tarball
"test_load"
];
enabledTestPaths = [ "tests/test_minimal.py" ];
pythonImportsCheck = [
"trimesh"
"trimesh.ray"
"trimesh.path"
"trimesh.path.exchange"
"trimesh.scene"
"trimesh.voxel"
"trimesh.visual"
"trimesh.viewer"
"trimesh.exchange"
"trimesh.resources"
"trimesh.interfaces"
];
meta = {
description = "Python library for loading and using triangular meshes";
homepage = "https://trimesh.org/";
changelog = "https://github.com/mikedh/trimesh/releases/tag/${src.tag}";
license = lib.licenses.mit;
mainProgram = "trimesh";
maintainers = with lib.maintainers; [
pbsds
];
};
}