1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 importlib-metadata,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "chameleon";
13 version = "4.6.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "malthe";
18 repo = "chameleon";
19 tag = version;
20 hash = "sha256-zCEM5yl8Y11FbexD7veS9bFJgm30L6fsTde59m2t1ec=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 pythonImportsCheck = [ "chameleon" ];
30
31 meta = with lib; {
32 changelog = "https://github.com/malthe/chameleon/blob/${src.tag}/CHANGES.rst";
33 description = "Fast HTML/XML Template Compiler";
34 downloadPage = "https://github.com/malthe/chameleon";
35 homepage = "https://chameleon.readthedocs.io";
36 license = licenses.bsd0;
37 maintainers = with maintainers; [ ];
38 };
39}