1{
2 lib,
3 buildPythonPackage,
4 colorful,
5 fetchFromGitHub,
6 git,
7 httpx,
8 lxml,
9 packaging,
10 poetry-core,
11 pytestCheckHook,
12 python-dateutil,
13 pythonOlder,
14 semver,
15 shtab,
16 rich,
17 tomlkit,
18}:
19
20buildPythonPackage rec {
21 pname = "pontos";
22 version = "25.4.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.9";
26
27 src = fetchFromGitHub {
28 owner = "greenbone";
29 repo = "pontos";
30 tag = "v${version}";
31 hash = "sha256-/RX4lYtMk+X4BmMWH8Su2sfE3sUTawxIb8D10UNvP/E=";
32 };
33
34 build-system = [ poetry-core ];
35
36 dependencies = [
37 colorful
38 httpx
39 lxml
40 packaging
41 python-dateutil
42 semver
43 shtab
44 rich
45 tomlkit
46 ] ++ httpx.optional-dependencies.http2;
47
48 nativeCheckInputs = [
49 git
50 pytestCheckHook
51 ];
52
53 disabledTests = [
54 "PrepareTestCase"
55 # Signing fails
56 "test_find_no_signing_key"
57 "test_find_signing_key"
58 "test_find_unreleased_information"
59 # CLI test fails
60 "test_missing_cmd"
61 "test_update_file_changed"
62 # Network access
63 "test_fail_sign_on_upload_fail"
64 "test_successfully_sign"
65 # calls git log, but our fetcher removes .git
66 "test_git_error"
67 # Tests require git executable
68 "test_github_action_output"
69 "test_initial_release"
70 # Tests are out-dated
71 "test_getting_version_without_version_config"
72 "test_verify_version_does_not_match"
73 ];
74
75 pythonImportsCheck = [ "pontos" ];
76
77 meta = with lib; {
78 description = "Collection of Python utilities, tools, classes and functions";
79 homepage = "https://github.com/greenbone/pontos";
80 changelog = "https://github.com/greenbone/pontos/releases/tag/${src.tag}";
81 license = with licenses; [ gpl3Plus ];
82 maintainers = with maintainers; [ fab ];
83 };
84}