python310Packages.hcloud: enable all tests
- add pythonImportsCheck - remove lint inputs - disable on older Python releases - add format - update description
This commit is contained in:
parent
c856c35fe9
commit
a046e6c8f3
|
@ -2,39 +2,44 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, future
|
, future
|
||||||
, requests
|
|
||||||
, python-dateutil
|
|
||||||
, flake8
|
|
||||||
, isort
|
|
||||||
, mock
|
, mock
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, isPy27
|
, python-dateutil
|
||||||
|
, pythonOlder
|
||||||
|
, requests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "hcloud";
|
pname = "hcloud";
|
||||||
version = "1.17.0";
|
version = "1.17.0";
|
||||||
disabled = isPy27;
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
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.
|
pythonImportsCheck = [
|
||||||
checkPhase = ''
|
"hcloud"
|
||||||
pytest --ignore=tests/integration
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Official Hetzner Cloud python library";
|
description = "Library for the Hetzner Cloud API";
|
||||||
homepage = "https://github.com/hetznercloud/hcloud-python";
|
homepage = "https://github.com/hetznercloud/hcloud-python";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.all;
|
|
||||||
maintainers = with maintainers; [ liff ];
|
maintainers = with maintainers; [ liff ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue