1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 flit-core,
6 pytestCheckHook,
7 numpy,
8 decopatch,
9 more-itertools,
10 nestedtext,
11 pyyaml,
12 tidyexc,
13 toml,
14}:
15
16buildPythonPackage rec {
17 pname = "parametrize-from-file";
18 version = "0.20.0";
19 format = "pyproject";
20
21 src = fetchPypi {
22 inherit version;
23 pname = "parametrize_from_file";
24 hash = "sha256-t4WLNDkC/ErBnOGK6FoYIfjoL/zF9MxPThJtGM1nUL4=";
25 };
26
27 # patch out coveralls since it doesn't provide us value
28 preBuild = ''
29 sed -i '/coveralls/d' ./pyproject.toml
30
31 substituteInPlace pyproject.toml \
32 --replace "more_itertools~=8.10" "more_itertools"
33 '';
34
35 nativeBuildInputs = [ flit-core ];
36
37 nativeCheckInputs = [
38 numpy
39 pytestCheckHook
40 ];
41
42 propagatedBuildInputs = [
43 decopatch
44 more-itertools
45 nestedtext
46 pyyaml
47 tidyexc
48 toml
49 ];
50
51 pythonImportsCheck = [ "parametrize_from_file" ];
52
53 disabledTests = [
54 # https://github.com/kalekundert/parametrize_from_file/issues/19
55 "test_load_suite_params_err"
56 ];
57
58 meta = with lib; {
59 description = "Read unit test parameters from config files";
60 homepage = "https://github.com/kalekundert/parametrize_from_file";
61 changelog = "https://github.com/kalekundert/parametrize_from_file/blob/v${version}/CHANGELOG.md";
62 license = licenses.mit;
63 maintainers = with maintainers; [ jpetrucciani ];
64 };
65}