1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 poetry-core,
9
10 # propagates
11 quart,
12 typing-extensions,
13
14 # tests
15 pytestCheckHook,
16 pytest-asyncio,
17 pytest-cov-stub,
18}:
19
20buildPythonPackage rec {
21 pname = "quart-cors";
22 version = "0.7.0";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "pgjones";
27 repo = "quart-cors";
28 rev = "refs/tags/${version}";
29 hash = "sha256-qUzs0CTZHf3fGADBXPkd3CjZ6dnz1t3cTxflMErvz/k=";
30 };
31
32 build-system = [ poetry-core ];
33
34 dependencies = [ quart ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
35
36 pythonImportsCheck = [ "quart_cors" ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 pytest-asyncio
41 pytest-cov-stub
42 ];
43
44 meta = with lib; {
45 description = "Quart-CORS is an extension for Quart to enable and control Cross Origin Resource Sharing, CORS";
46 homepage = "https://github.com/pgjones/quart-cors/";
47 changelog = "https://github.com/pgjones/quart-cors/blob/${src.rev}/CHANGELOG.rst";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}