2019-12-29 18:04:14 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-07-20 21:07:53 +00:00
|
|
|
, pytest-runner
|
2019-12-29 18:04:14 +00:00
|
|
|
, pytest
|
|
|
|
, pytest-asyncio
|
|
|
|
, contextvars
|
|
|
|
, sqlalchemy
|
|
|
|
, isPy27
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiocontextvars";
|
|
|
|
version = "0.2.2";
|
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fantix";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0a2gmrm9csiknc8n3si67sgzffkydplh9d7ga1k87ygk2aj22mmk";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-07-20 21:07:53 +00:00
|
|
|
pytest-runner
|
2019-12-29 18:04:14 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlalchemy
|
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [ contextvars ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Asyncio support for PEP-567 contextvars backport";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/fantix/aiocontextvars";
|
2019-12-29 18:04:14 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|