1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitLab,
5 fetchFromGitHub,
6 pythonOlder,
7 setuptools,
8 dataclasses-json,
9 deprecated,
10 pytestCheckHook,
11}:
12
13let
14 gltf-sample-models = fetchFromGitHub {
15 owner = "KhronosGroup";
16 repo = "glTF-Sample-Models";
17 rev = "d7a3cc8e51d7c573771ae77a57f16b0662a905c6";
18 hash = "sha256-TxSg1O6eIiaKagcZUoWZ5Iw/tBKvQIoepRFp3MdVlyI=";
19 };
20in
21
22buildPythonPackage rec {
23 pname = "pygltflib";
24 version = "1.16.5";
25 pyproject = true;
26
27 disabled = pythonOlder "3.6";
28
29 src = fetchFromGitLab {
30 owner = "dodgyville";
31 repo = "pygltflib";
32 tag = "v${version}";
33 hash = "sha256-3XfOlL+l0isMFv71+uY/PBHCwND54qACoCVYntfCot4=";
34 };
35
36 nativeBuildInputs = [ setuptools ];
37
38 propagatedBuildInputs = [
39 dataclasses-json
40 deprecated
41 ];
42
43 nativeCheckInputs = [ pytestCheckHook ];
44 preCheck = ''
45 ln -s ${gltf-sample-models} glTF-Sample-Models
46 '';
47
48 pythonImportsCheck = [ "pygltflib" ];
49
50 meta = with lib; {
51 description = "Module for reading and writing basic glTF files";
52 homepage = "https://gitlab.com/dodgyville/pygltflib";
53 changelog = "https://gitlab.com/dodgyville/pygltflib/-/blob/v${version}/CHANGELOG.md";
54 license = licenses.mit;
55 maintainers = with maintainers; [ bcdarwin ];
56 };
57}