1{
2 lib,
3 aiohttp,
4 apispec,
5 buildPythonPackage,
6 fetchFromGitHub,
7 jinja2,
8 packaging,
9 pytest-aiohttp,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13 webargs,
14}:
15
16buildPythonPackage rec {
17 pname = "aiohttp-apispec";
18 version = "3.0.0b2";
19 pyproject = true;
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "maximdanilchenko";
25 repo = "aiohttp-apispec";
26 tag = "v${version}";
27 hash = "sha256-C+/M25oCLTNGGEUj2EyXn3UjcvPvDYFmmUW8IOoF1uU=";
28 };
29
30 doCheck = false;
31
32 /*
33 postPatch = ''
34 substituteInPlace tests/conftest.py \
35 --replace-fail 'aiohttp_app(loop,' 'aiohttp_app(event_loop,' \
36 --replace-fail 'return loop.run_until_complete' 'return event_loop.run_until_complete'
37 '';
38 */
39
40 build-system = [ setuptools ];
41
42 dependencies = [
43 aiohttp
44 apispec
45 jinja2
46 packaging
47 webargs
48 ];
49
50 nativeCheckInputs = [
51 pytest-aiohttp
52 pytestCheckHook
53 ];
54
55 pythonImportsCheck = [ "aiohttp_apispec" ];
56
57 meta = with lib; {
58 description = "Build and document REST APIs with aiohttp and apispec";
59 homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
60 license = licenses.mit;
61 maintainers = [ ];
62 };
63}