1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchPypi
5, isPy3k
6, jsonpickle
7, mock
8, pytest
9, pytestCheckHook
10, requests
11, responses
12}:
13
14buildPythonPackage rec {
15 pname = "python-digitalocean";
16 version = "1.16.0";
17
18 src = fetchFromGitHub {
19 owner = "koalalorenzo";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "16fxlfpisj4rcj9dvlifs6bpx42a0sn9b07bnyzwrbhi6nfvkd2g";
23 };
24
25 propagatedBuildInputs = [
26 jsonpickle
27 requests
28 ];
29
30 dontUseSetuptoolsCheck = true;
31
32 checkInputs = [
33 pytest
34 pytestCheckHook
35 responses
36 ] ++ lib.optionals (!isPy3k) [
37 mock
38 ];
39
40 preCheck = ''
41 cd digitalocean
42 '';
43
44 pythonImportsCheck = [ "digitalocean" ];
45
46 meta = with lib; {
47 description = "Python API to manage Digital Ocean Droplets and Images";
48 homepage = "https://github.com/koalalorenzo/python-digitalocean";
49 license = with licenses; [ lgpl3Only ];
50 maintainers = with maintainers; [ kiwi teh ];
51 };
52}