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