1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 requests,
8 requests-oauthlib,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "ovh";
14 version = "1.2.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-0xHwjsF7YsxhIWs9rPA+6J+VodqQNqWV2sKfydeYuCc=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [
27 requests
28 requests-oauthlib
29 ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "ovh" ];
34
35 disabledTests = [
36 # Tests require network access
37 "test_config_from_files"
38 "test_config_from_given_config_file"
39 "test_config_from_invalid_ini_file"
40 "test_config_from_only_one_file"
41 "test_endpoints"
42 # Tests require API key
43 "test_config_oauth2"
44 "test_config_invalid_both"
45 "test_config_invalid_oauth2"
46 "test_config_incompatible_oauth2"
47 ];
48
49 meta = with lib; {
50 description = "Thin wrapper around OVH's APIs";
51 homepage = "https://github.com/ovh/python-ovh";
52 changelog = "https://github.com/ovh/python-ovh/blob/v${version}/CHANGELOG.md";
53 license = licenses.bsd2;
54 maintainers = with maintainers; [ makefu ];
55 };
56}