Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-creole / default.nix
blob7f27466fa2be5ba4cddf32746b1e09bed9421837
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , runtimeShell
7 # build
8 , poetry-core
10 # propagates
11 , docutils
13 # tests
14 , pytestCheckHook
15 , readme-renderer
16 , textile
19 buildPythonPackage rec {
20   pname = "python-creole";
21   version = "1.4.10";
22   format = "pyproject";
24   src = fetchFromGitHub {
25     owner = "jedie";
26     repo = "python-creole";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-8pXOnLNjhIv0d+BqjW8wlb6BT6CmFHSsxn5wLOv3LBQ=";
29   };
31   patches = [
32     # https://github.com/jedie/python-creole/pull/77
33     (fetchpatch {
34       name = "replace-poetry-with-poetry-core.patch";
35       url = "https://github.com/jedie/python-creole/commit/bfc46730ab4a189f3142246cead8d26005a28671.patch";
36       hash = "sha256-WtoEQyu/154Cfj6eSnNA+t37+o7Ij328QGMKxwcLg5k=";
37     })
38   ];
40   nativeBuildInputs = [
41     poetry-core
42   ];
44   postPatch = ''
45     substituteInPlace Makefile \
46       --replace "/bin/bash" "${runtimeShell}"
48     sed -i "/-cov/d" pytest.ini
49   '';
51   propagatedBuildInputs = [
52     docutils
53   ];
55   pythonImportsCheck = [
56     "creole"
57   ];
59   nativeCheckInputs = [
60     pytestCheckHook
61     readme-renderer
62     textile
63   ];
65   preCheck = ''
66     export PATH=$out/bin:$PATH
67   '';
69   disabledTests = [
70     # macro didn't expect argument
71     "test_macro_wrong_arguments_quite"
72     "test_macro_wrong_arguments_with_error_report"
73     # rendering mismatches, likely docutils version mismatch
74     "test_headlines1"
75     "test_simple_table"
76   ];
78   disabledTestPaths = [
79     # requires poetry
80     "creole/tests/test_Makefile.py"
81     # requires poetry_publish
82     "creole/publish.py"
83     "creole/tests/test_project_setup.py"
84     # rendering differencenes, likely docutils version mismatch
85     "creole/tests/test_cross_compare_rest.py"
86     "creole/tests/test_rest2html.py"
87   ];
89   meta = with lib; {
90     description = "Creole markup tools written in Python";
91     homepage = "https://github.com/jedie/python-creole";
92     changelog = "https://github.com/jedie/python-creole/releases/tag/v${version}";
93     license = licenses.gpl3Plus;
94     maintainers = with maintainers; [ hexa ];
95   };