python3Packages.aiolimiter: fix build failure (#459661)
This commit is contained in:
@@ -3,20 +3,16 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
poetry-core,
|
||||
importlib-metadata,
|
||||
pytest-asyncio,
|
||||
pytest-cov-stub,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
toml,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiolimiter";
|
||||
version = "1.2.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mjpieters";
|
||||
@@ -25,9 +21,15 @@ buildPythonPackage rec {
|
||||
hash = "sha256-wgHR0GzaPXlhL4ErklFqmWNFO49dvd5X5MgyYHVH4Eo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
# ERROR: '"session"' is not a valid asyncio_default_fixture_loop_scope. Valid scopes are: function, class, module, package, session.
|
||||
# Post 1.2.1, the project switched from tox and is no longer affected, hence fixed in nixpkgs only.
|
||||
postPatch = ''
|
||||
substituteInPlace tox.ini --replace-fail \
|
||||
'asyncio_default_fixture_loop_scope = "session"' \
|
||||
'asyncio_default_fixture_loop_scope = session'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-asyncio
|
||||
@@ -38,11 +40,11 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "aiolimiter" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Implementation of a rate limiter for asyncio";
|
||||
homepage = "https://github.com/mjpieters/aiolimiter";
|
||||
changelog = "https://github.com/mjpieters/aiolimiter/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
license = with lib.licenses; [ mit ];
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user