2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-03-30 22:05:00 +00:00
|
|
|
, setuptools
|
2021-08-22 07:53:02 +00:00
|
|
|
, numpy
|
2023-03-30 22:05:00 +00:00
|
|
|
, lxml
|
2021-08-22 07:53:02 +00:00
|
|
|
}:
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trimesh";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.22.3";
|
2023-03-30 22:05:00 +00:00
|
|
|
format = "pyproject";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-PrXqBYOEFCXIZsihhImh1swbGFRCoyTGl82dkfBE7aU=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
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
|
|
|
|
'';
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
pythonImportsCheck = [ "trimesh" ];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
meta = with lib; {
|
2021-08-22 07:53:02 +00:00
|
|
|
description = "Python library for loading and using triangular meshes";
|
2020-05-15 21:57:56 +00:00
|
|
|
homepage = "https://trimsh.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|