summary refs log tree commit diff
path: root/pkgs/development/python-modules/ovh/default.nix
blob: 9b071612385790ca20d087ca19c4ec267f65071a (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchPypi
, mock
, nose
, requests
, yanc
}:

buildPythonPackage rec {
  pname = "ovh";
  version = "1.0.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-IQzwu0gwfPNPOLQLCO99KL5Hu2094Y+acQBFXVGzHhU=";
  };

  propagatedBuildInputs = [
    requests
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  nativeCheckInputs = [
    mock
    nose
    yanc
  ];

  # requires network
  checkPhase = ''
    nosetests . \
      -e test_config_get_conf \
      -e test_config_get_custom_conf \
      -e test_endpoints \
      -e test_init_from_custom_config
  '';

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