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