2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-04-27 09:35:20 +00:00
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, requests
|
|
|
|
, yanc
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ovh";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.0.0";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-IQzwu0gwfPNPOLQLCO99KL5Hu2094Y+acQBFXVGzHhU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Thin wrapper around OVH's APIs";
|
|
|
|
homepage = "https://github.com/ovh/python-ovh";
|
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = [ lib.maintainers.makefu ];
|
|
|
|
};
|
|
|
|
}
|