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