1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pytest-asyncio
6, isPy27
7}:
8
9buildPythonPackage rec {
10 pname = "aiocontextvars";
11 version = "0.2.2";
12 format = "setuptools";
13 disabled = isPy27;
14
15 src = fetchFromGitHub {
16 owner = "fantix";
17 repo = pname;
18 rev = "v${version}";
19 sha256 = "0a2gmrm9csiknc8n3si67sgzffkydplh9d7ga1k87ygk2aj22mmk";
20 };
21
22 postPatch = ''
23 substituteInPlace setup.py \
24 --replace "'pytest-runner'," ""
25 '';
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 pytest-asyncio
30 ];
31
32 meta = with lib; {
33 description = "Asyncio support for PEP-567 contextvars backport";
34 homepage = "https://github.com/fantix/aiocontextvars";
35 license = licenses.bsd3;
36 maintainers = [ ];
37 };
38}