python310Packages.hcloud: enable all tests

- add pythonImportsCheck
- remove lint inputs
- disable on older Python releases
- add format
- update description
This commit is contained in:
Fabian Affolter 2022-07-01 08:50:39 +02:00 committed by GitHub
parent c856c35fe9
commit a046e6c8f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,39 +2,44 @@
, buildPythonPackage
, fetchPypi
, future
, requests
, python-dateutil
, flake8
, isort
, mock
, pytest
, isPy27
, pytestCheckHook
, python-dateutil
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "hcloud";
version = "1.17.0";
disabled = isPy27;
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-+BQuBDi+J3xvod3uE67NXaFStIxt7H/Ulw3vG13CGeI=";
hash = "sha256-+BQuBDi+J3xvod3uE67NXaFStIxt7H/Ulw3vG13CGeI=";
};
propagatedBuildInputs = [ future requests python-dateutil ];
propagatedBuildInputs = [
future
requests
python-dateutil
];
checkInputs = [ flake8 isort mock pytest ];
checkInputs = [
mock
pytestCheckHook
];
# Skip integration tests since they require a separate external fake API endpoint.
checkPhase = ''
pytest --ignore=tests/integration
'';
pythonImportsCheck = [
"hcloud"
];
meta = with lib; {
description = "Official Hetzner Cloud python library";
description = "Library for the Hetzner Cloud API";
homepage = "https://github.com/hetznercloud/hcloud-python";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ liff ];
};
}