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