summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/aodhclient/default.nix
blob: 49bcde20b2cc3a011630ad2608cf6357a0050315 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pbr,
  setuptools,

  # direct
  cliff,
  osc-lib,
  oslo-i18n,
  oslo-serialization,
  oslo-utils,
  osprofiler,
  keystoneauth1,
  pyparsing,

  # tests
  stestrCheckHook,
  versionCheckHook,
  openstacksdk,
  oslotest,
  tempest,
  testtools,
  pifpaf,

  # docs
  sphinxHook,
  openstackdocstheme,
}:

buildPythonPackage (finalAttrs: {
  pname = "aodhclient";
  version = "3.11.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "openstack";
    repo = "python-aodhclient";
    tag = finalAttrs.version;
    hash = "sha256-vyrs7QewZknxB1fovZQRhOJe3G9J5YEN4cIHeLrnvrU=";
  };

  env.PBR_VERSION = finalAttrs.version;

  build-system = [
    pbr
    setuptools
  ];

  nativeBuildInputs = [
    openstackdocstheme
    sphinxHook
  ];

  sphinxBuilders = [ "man" ];

  patches = [
    ./fix-pyproject.patch
  ];

  dependencies = [
    cliff
    keystoneauth1
    osc-lib
    oslo-i18n
    oslo-serialization
    oslo-utils
    osprofiler
    pbr
    pyparsing
  ];

  nativeCheckInputs = [
    stestrCheckHook
    openstacksdk
    oslotest
    tempest
    testtools
    pifpaf
  ];

  nativeInstallCheckInputs = [ versionCheckHook ];
  doInstallCheck = true;

  pythonImportsCheck = [
    "aodhclient"
    "aodhclient.v2"
    "aodhclient.tests"
    "aodhclient.tests.functional"
    "aodhclient.tests.unit"
  ];

  meta = {
    description = "Client library for OpenStack AOodh API";
    homepage = "https://docs.openstack.org/python-aodhclient/latest/";
    downloadPage = "https://github.com/openstack/python-aodhclient/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.asl20;
    mainProgram = "aodh";
    teams = [ lib.teams.openstack ];
  };
})