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.35";
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-FQc8R4MJ5RKJi70ADboy2Lw6IwLaI3hup60GcnPxV60=";
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 ]
45 ++ lib.optionals (pythonAtLeast "3.13") [
46 # doctest runs one more test than expected
47 "test_inform"
48 ];
49
50 meta = with lib; {
51 description = "Print and logging utilities";
52 longDescription = ''
53 Inform is designed to display messages from programs that are typically
54 run from a console. It provides a collection of ‘print’ functions that
55 allow you to simply and cleanly print different types of messages.
56 '';
57 homepage = "https://inform.readthedocs.io";
58 changelog = "https://github.com/KenKundert/inform/blob/${src.tag}/doc/releases.rst";
59 license = licenses.gpl3Only;
60 maintainers = with maintainers; [ jeremyschlatter ];
61 };
62}