1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 arrow,
7 six,
8 hypothesis,
9 num2words,
10 pytestCheckHook,
11 pythonOlder,
12 pythonAtLeast,
13}:
14
15buildPythonPackage rec {
16 pname = "inform";
17 version = "1.33";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "KenKundert";
24 repo = "inform";
25 tag = "v${version}";
26 hash = "sha256-YX+YT3pocauIAsxsfIM+TchiXYMGYVwiE84NnXoZDqQ=";
27 };
28
29 nativeBuildInputs = [ flit-core ];
30
31 propagatedBuildInputs = [
32 arrow
33 six
34 ];
35
36 nativeCheckInputs = [
37 num2words
38 pytestCheckHook
39 hypothesis
40 ];
41
42 disabledTests =
43 [ "test_prostrate" ]
44 ++ lib.optionals (pythonAtLeast "3.13") [
45 # doctest runs one more test than expected
46 "test_inform"
47 ];
48
49 meta = with lib; {
50 description = "Print and logging utilities";
51 longDescription = ''
52 Inform is designed to display messages from programs that are typically
53 run from a console. It provides a collection of ‘print’ functions that
54 allow you to simply and cleanly print different types of messages.
55 '';
56 homepage = "https://inform.readthedocs.io";
57 changelog = "https://github.com/KenKundert/inform/blob/v${version}/doc/releases.rst";
58 license = licenses.gpl3Only;
59 maintainers = with maintainers; [ jeremyschlatter ];
60 };
61}