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