Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / quart-cors / default.nix
blob78f3f0311f88073e88c00f79ec47a18aaed79f18
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
6 # build-system
7 , poetry-core
9 # propagates
10 , quart
11 , typing-extensions
13 # tests
14 , pytestCheckHook
15 , pytest-asyncio
18 buildPythonPackage rec {
19   pname = "quart-cors";
20   version = "0.7.0";
21   format = "pyproject";
23   src = fetchFromGitHub {
24     owner = "pgjones";
25     repo = "quart-cors";
26     rev = "refs/tags/${version}";
27     hash = "sha256-qUzs0CTZHf3fGADBXPkd3CjZ6dnz1t3cTxflMErvz/k=";
28   };
30   nativeBuildInputs = [
31     poetry-core
32   ];
34   postPatch = ''
35     substituteInPlace pyproject.toml \
36       --replace "--no-cov-on-fail " ""
37   '';
39   propagatedBuildInputs = [
40     quart
41   ] ++ lib.optionals (pythonOlder "3.10") [
42     typing-extensions
43   ];
45   pythonImportsCheck = [
46     "quart_cors"
47   ];
49   nativeCheckInputs = [
50     pytestCheckHook
51     pytest-asyncio
52   ];
54   meta = with lib; {
55     description = "Quart-CORS is an extension for Quart to enable and control Cross Origin Resource Sharing, CORS";
56     homepage = "https://github.com/pgjones/quart-cors/";
57     changelog = "https://github.com/pgjones/quart-cors/blob/${src.rev}/CHANGELOG.rst";
58     license = licenses.mit;
59     maintainers = with maintainers; [ hexa ];
60   };