pythonPackages.pyhaversion: Mark >= Python 3.8 only, disable tests

This commit is contained in:
Sandro Jäckel 2021-01-09 23:20:53 +01:00
parent 65d9252c34
commit 7d08eaaad0
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 6 additions and 15 deletions

View File

@ -1,24 +1,16 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, isPy3k , pythonOlder
# propagatedBuildInputs
, aiohttp , aiohttp
, async-timeout , async-timeout
, semantic-version , semantic-version
# buildInputs
, pytestrunner , pytestrunner
# checkInputs
, pytest
, pytest-asyncio
, aresponses
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyhaversion"; pname = "pyhaversion";
version = "3.4.2"; version = "3.4.2";
disabled = pythonOlder "3.8";
# needs aiohttp which is py3k-only
disabled = !isPy3k;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -35,15 +27,14 @@ buildPythonPackage rec {
pytestrunner pytestrunner
]; ];
checkInputs = [ # no tests
pytest doCheck = false;
pytest-asyncio pythonImportsCheck = [ "pyhaversion" ];
aresponses
];
meta = with lib; { meta = with lib; {
description = "A python module to the newest version number of Home Assistant"; description = "A python module to the newest version number of Home Assistant";
homepage = "https://github.com/ludeeus/pyhaversion"; homepage = "https://github.com/ludeeus/pyhaversion";
license = with licenses; [ mit ];
maintainers = [ maintainers.makefu ]; maintainers = [ maintainers.makefu ];
}; };
} }