1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 poetry-core,
7 pytest-asyncio,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "aiohttp-fast-url-dispatcher";
14 version = "0.3.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "bdraco";
21 repo = "aiohttp-fast-url-dispatcher";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-DZTW9CazcUY3hyxr0MbVfM/yJzUzwN43c2n07Sloxa8=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace " --cov=aiohttp_fast_url_dispatcher --cov-report=term-missing:skip-covered" ""
29 '';
30
31 nativeBuildInputs = [ poetry-core ];
32
33 propagatedBuildInputs = [ aiohttp ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "aiohttp_fast_url_dispatcher" ];
41
42 meta = with lib; {
43 description = "A faster URL dispatcher for aiohttp";
44 homepage = "https://github.com/bdraco/aiohttp-fast-url-dispatcher";
45 changelog = "https://github.com/bdraco/aiohttp-fast-url-dispatcher/blob/${version}/CHANGELOG.md";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ fab ];
48 };
49}