summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ovh/default.nix
blob: 8b4c8ad87d2eb2b842ac4e5d3ef92bf3c3d47e82 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pytestCheckHook,
  requests,
  requests-oauthlib,
  setuptools,
}:

buildPythonPackage rec {
  pname = "ovh";
  version = "1.2.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-0xHwjsF7YsxhIWs9rPA+6J+VodqQNqWV2sKfydeYuCc=";
  };

  build-system = [ setuptools ];

  dependencies = [
    requests
    requests-oauthlib
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "ovh" ];

  disabledTests = [
    # Tests require network access
    "test_config_from_files"
    "test_config_from_given_config_file"
    "test_config_from_invalid_ini_file"
    "test_config_from_only_one_file"
    "test_endpoints"
    # Tests require API key
    "test_config_oauth2"
    "test_config_invalid_both"
    "test_config_invalid_oauth2"
    "test_config_incompatible_oauth2"
  ];

  meta = {
    description = "Thin wrapper around OVH's APIs";
    homepage = "https://github.com/ovh/python-ovh";
    changelog = "https://github.com/ovh/python-ovh/blob/v${version}/CHANGELOG.md";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ makefu ];
  };
}