1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 fetchpatch,
7 pytest-aiohttp,
8 pytestCheckHook,
9 pythonOlder,
10 webtest,
11}:
12
13buildPythonPackage rec {
14 pname = "webtest-aiohttp";
15 version = "2.0.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "sloria";
22 repo = pname;
23 rev = version;
24 hash = "sha256-UuAz/k/Tnumupv3ybFR7PkYHwG3kH7M5oobZykEP+ao=";
25 };
26
27 patches = [
28 (fetchpatch {
29 name = "python311-compat.patch";
30 url = "https://github.com/sloria/webtest-aiohttp/commit/64e5ab1867ea9ef87901bb2a1a6142566bffc90b.patch";
31 hash = "sha256-OKJGajqJLFMkcbGmGfU9G5hCpJaj24Gs363sI0z7YZw=";
32 })
33 ];
34
35 propagatedBuildInputs = [ webtest ];
36
37 nativeCheckInputs = [
38 aiohttp
39 pytest-aiohttp
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [ "webtest_aiohttp" ];
44
45 meta = with lib; {
46 changelog = "https://github.com/sloria/webtest-aiohttp/blob/${src.rev}/CHANGELOG.rst";
47 description = "Provides integration of WebTest with aiohttp.web applications";
48 homepage = "https://github.com/sloria/webtest-aiohttp";
49 license = licenses.mit;
50 maintainers = with maintainers; [ cript0nauta ];
51 };
52}