nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 102 lines 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pytestCheckHook, 7 numpy, 8 lxml, 9 trimesh, 10 11 # optional deps 12 colorlog, 13 manifold3d, 14 charset-normalizer, 15 jsonschema, 16 networkx, 17 svg-path, 18 pycollada, 19 shapely, 20 xxhash, 21 rtree, 22 httpx, 23 scipy, 24 pillow, 25 mapbox-earcut, 26}: 27 28buildPythonPackage rec { 29 pname = "trimesh"; 30 version = "4.11.1"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "mikedh"; 35 repo = "trimesh"; 36 tag = version; 37 hash = "sha256-N9loKQ+xcUtug98K2nsCs5kXUnLLtxCqNH8L8wStb74="; 38 }; 39 40 build-system = [ setuptools ]; 41 42 dependencies = [ numpy ]; 43 44 optional-dependencies = { 45 easy = [ 46 colorlog 47 manifold3d 48 charset-normalizer 49 lxml 50 jsonschema 51 networkx 52 svg-path 53 pycollada 54 shapely 55 xxhash 56 rtree 57 httpx 58 scipy 59 pillow 60 # vhacdx # not packaged 61 mapbox-earcut 62 # embreex # not packaged 63 ]; 64 }; 65 66 nativeCheckInputs = [ 67 lxml 68 pytestCheckHook 69 ]; 70 71 disabledTests = [ 72 # requires loading models which aren't part of the Pypi tarball 73 "test_load" 74 ]; 75 76 enabledTestPaths = [ "tests/test_minimal.py" ]; 77 78 pythonImportsCheck = [ 79 "trimesh" 80 "trimesh.ray" 81 "trimesh.path" 82 "trimesh.path.exchange" 83 "trimesh.scene" 84 "trimesh.voxel" 85 "trimesh.visual" 86 "trimesh.viewer" 87 "trimesh.exchange" 88 "trimesh.resources" 89 "trimesh.interfaces" 90 ]; 91 92 meta = { 93 description = "Python library for loading and using triangular meshes"; 94 homepage = "https://trimesh.org/"; 95 changelog = "https://github.com/mikedh/trimesh/releases/tag/${src.tag}"; 96 license = lib.licenses.mit; 97 mainProgram = "trimesh"; 98 maintainers = with lib.maintainers; [ 99 pbsds 100 ]; 101 }; 102}