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