1{ lib
2, buildPythonPackage
3, fetchPypi
4, future
5, requests
6, python-dateutil
7, flake8
8, isort
9, mock
10, pytest
11, isPy27
12}:
13
14buildPythonPackage rec {
15 pname = "hcloud";
16 version = "1.16.0";
17 disabled = isPy27;
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "c8b94557d93bcfe437f20a8176693ea4f54358b74986cc19d94ebc23f48e40cc";
22 };
23
24 propagatedBuildInputs = [ future requests python-dateutil ];
25
26 checkInputs = [ flake8 isort mock pytest ];
27
28 # Skip integration tests since they require a separate external fake API endpoint.
29 checkPhase = ''
30 pytest --ignore=tests/integration
31 '';
32
33 meta = with lib; {
34 description = "Official Hetzner Cloud python library";
35 homepage = "https://github.com/hetznercloud/hcloud-python";
36 license = licenses.mit;
37 platforms = platforms.all;
38 maintainers = with maintainers; [ liff ];
39 };
40}