depot/third_party/nixpkgs/pkgs/development/python-modules/trimesh/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

43 lines
1,007 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, pythonOlder
, numpy
, lxml
}:
buildPythonPackage rec {
pname = "trimesh";
version = "3.23.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-2MQJJaTzpDeuk9BPLbzwWtbLC3jzd7ht2oGrVMCXRoc=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ numpy ];
nativeCheckInputs = [ lxml ];
checkPhase = ''
# Disable test_load because requires loading models which aren't part of the tarball
substituteInPlace tests/test_minimal.py --replace "test_load" "disable_test_load"
python tests/test_minimal.py
'';
pythonImportsCheck = [ "trimesh" ];
meta = with lib; {
description = "Python library for loading and using triangular meshes";
homepage = "https://trimsh.org/";
changelog = "https://github.com/mikedh/trimesh/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ gebner ];
};
}