1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonAtLeast,
6
7 # build-system
8 setuptools,
9
10 # tests
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "paginate";
16 version = "0.5.7";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "Pylons";
21 repo = "paginate";
22 rev = version;
23 hash = "sha256-+zX9uGNWcV4BWbD2lcd1u9zZ4m7CnbsYZnc99HNaF8I=";
24 };
25
26 nativeBuildInputs = [ setuptools ];
27
28 pythonImportsCheck = [ "paginate" ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 disabledTests = lib.optionals (pythonAtLeast "3.12") [
33 # https://github.com/Pylons/paginate/issues/19
34 "test_wrong_collection"
35 "test_unsliceable_sequence3"
36 ];
37
38 meta = with lib; {
39 description = "Python pagination module";
40 homepage = "https://github.com/Pylons/paginate";
41 changelog = "https://github.com/Pylons/paginate/blob/${src.rev}/CHANGELOG.txt";
42 license = licenses.mit;
43 maintainers = with maintainers; [ hexa ];
44 };
45}