2021-01-17 17:08:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-02-27 22:52:14 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, jsonpickle
|
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
}:
|
2018-04-03 12:39:28 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-digitalocean";
|
2021-01-17 16:57:59 +00:00
|
|
|
version = "1.16.0";
|
2018-04-03 12:39:28 +01:00
|
|
|
|
2020-02-27 22:52:14 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "koalalorenzo";
|
2021-01-17 17:08:35 +00:00
|
|
|
repo = pname;
|
2020-02-27 22:52:14 +00:00
|
|
|
rev = "v${version}";
|
2021-01-17 16:57:59 +00:00
|
|
|
sha256 = "16fxlfpisj4rcj9dvlifs6bpx42a0sn9b07bnyzwrbhi6nfvkd2g";
|
2018-04-03 12:39:28 +01:00
|
|
|
};
|
|
|
|
|
2020-02-27 22:52:14 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonpickle
|
|
|
|
requests
|
|
|
|
];
|
2018-04-03 12:39:28 +01:00
|
|
|
|
2020-02-27 22:52:14 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
2021-01-17 17:08:35 +00:00
|
|
|
] ++ lib.optionals (!isPy3k) [
|
2020-02-27 22:52:14 +00:00
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd digitalocean
|
|
|
|
'';
|
2018-04-03 12:39:28 +01:00
|
|
|
|
2021-01-17 17:08:35 +00:00
|
|
|
pythonImportsCheck = [ "digitalocean" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-01-17 17:08:35 +00:00
|
|
|
description = "Python API to manage Digital Ocean Droplets and Images";
|
|
|
|
homepage = "https://github.com/koalalorenzo/python-digitalocean";
|
|
|
|
license = with licenses; [ lgpl3Only ];
|
|
|
|
maintainers = with maintainers; [ kiwi teh ];
|
2018-04-03 12:39:28 +01:00
|
|
|
};
|
|
|
|
}
|