summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pontos/default.nix
blob: 73b0112c835599c860c3cf2576596a02b78f3198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
  lib,
  buildPythonPackage,
  colorful,
  fetchFromGitHub,
  git,
  httpx,
  lxml,
  packaging,
  poetry-core,
  pytestCheckHook,
  python-dateutil,
  semver,
  shtab,
  rich,
  tomlkit,
}:

buildPythonPackage rec {
  pname = "pontos";
  version = "25.8.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "greenbone";
    repo = "pontos";
    tag = "v${version}";
    hash = "sha256-uQe21Yp1PYeU/NgbQMbC2yBqEA1yUUaCiKc7k/oeS7g=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    colorful
    httpx
    lxml
    packaging
    python-dateutil
    semver
    shtab
    rich
    tomlkit
  ]
  ++ httpx.optional-dependencies.http2;

  nativeCheckInputs = [
    git
    pytestCheckHook
  ];

  disabledTests = [
    "PrepareTestCase"
    # Signing fails
    "test_find_no_signing_key"
    "test_find_signing_key"
    "test_find_unreleased_information"
    # CLI test fails
    "test_missing_cmd"
    "test_update_file_changed"
    # Network access
    "test_fail_sign_on_upload_fail"
    "test_successfully_sign"
    # calls git log, but our fetcher removes .git
    "test_git_error"
    # Tests require git executable
    "test_github_action_output"
    "test_initial_release"
    # Tests are out-dated
    "test_getting_version_without_version_config"
    "test_verify_version_does_not_match"
  ];

  pythonImportsCheck = [ "pontos" ];

  meta = {
    description = "Collection of Python utilities, tools, classes and functions";
    homepage = "https://github.com/greenbone/pontos";
    changelog = "https://github.com/greenbone/pontos/releases/tag/${src.tag}";
    license = with lib.licenses; [ gpl3Plus ];
    maintainers = with lib.maintainers; [ fab ];
  };
}