1{
2 lib,
3 buildPythonPackage,
4 dpath,
5 fetchFromGitHub,
6 numpy,
7 plac,
8 poetry-core,
9 pytestCheckHook,
10 pythonOlder,
11 pyyaml,
12}:
13
14buildPythonPackage rec {
15 pname = "yte";
16 version = "1.7.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "koesterlab";
23 repo = "yte";
24 tag = "v${version}";
25 hash = "sha256-W9t2BlBp947Rwnq+IKbL5aJqauZmYQOzuBIstw6hHQY=";
26 };
27
28 build-system = [ poetry-core ];
29
30 dependencies = [
31 dpath
32 plac
33 pyyaml
34 ];
35
36 nativeCheckInputs = [
37 numpy
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [ "yte" ];
42
43 pytestFlagsArray = [ "tests.py" ];
44
45 preCheck = ''
46 # The CLI test need yte on the PATH
47 export PATH=$out/bin:$PATH
48 '';
49
50 meta = with lib; {
51 description = "YAML template engine with Python expressions";
52 homepage = "https://github.com/koesterlab/yte";
53 changelog = "https://github.com/yte-template-engine/yte/blob/${src.tag}/CHANGELOG.md";
54 license = licenses.mit;
55 maintainers = with maintainers; [ fab ];
56 mainProgram = "yte";
57 };
58}