Merge pull request #145909 from fabaff/pytest-aiohttp-remotes

python3Packages.aiohttp-remotes: switch to pytestCheckHook
This commit is contained in:
Thiago Kenji Okada 2021-11-14 12:45:41 -03:00 committed by GitHub
commit 59bea1f3b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,27 +1,50 @@
{ lib, buildPythonPackage, fetchPypi
, aiohttp, pytest, pytest-cov, pytest-aiohttp
{ lib
, aiohttp
, buildPythonPackage
, fetchPypi
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "aiohttp_remotes";
pname = "aiohttp-remotes";
version = "1.1.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
pname = "aiohttp_remotes";
inherit version;
sha256 = "e44f2c5fd5fc3305477c89bb25f14570589100cc58c48b36745d4239839d3174";
};
propagatedBuildInputs = [ aiohttp ];
propagatedBuildInputs = [
aiohttp
] ++ lib.optionals (pythonOlder "3.7") [
typing-extensions
];
checkInputs = [ pytest pytest-cov pytest-aiohttp ];
checkPhase = ''
python -m pytest
checkInputs = [
pytest-aiohttp
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace " --no-cov-on-fail --cov-branch --cov=aiohttp_remotes --cov-report=term --cov-report=html" ""
'';
pythonImportsCheck = [
"aiohttp_remotes"
];
meta = with lib; {
homepage = "https://github.com/wikibusiness/aiohttp-remotes";
description = "A set of useful tools for aiohttp.web server";
homepage = "https://github.com/wikibusiness/aiohttp-remotes";
license = licenses.mit;
maintainers = [ maintainers.qyliss ];
maintainers = with maintainers; [ qyliss ];
};
}