2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
|
|
|
, jsonpickle
|
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-digitalocean";
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "1.17.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "koalalorenzo";
|
2021-02-05 17:12:51 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2021-10-04 12:37:57 +00:00
|
|
|
sha256 = "1c50ka4y712rr551gq3kdfw7fgfxr4w837sww6yy683yz7m1d1h8";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonpickle
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals (!isPy3k) [
|
2020-04-24 23:36:52 +00:00
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd digitalocean
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "digitalocean" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-02-05 17:12:51 +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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|