From 5ea1b9d7cdb6356083674a6bb5bbdb95909d5cdb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 9 Mar 2023 00:35:43 +0100 Subject: [PATCH] python310Packages.quart-cors: init at 0.6.0 Quart-CORS is an extension for Quart to enable and control Cross Origin Resource Sharing, CORS. --- .../python-modules/quart-cors/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/quart-cors/default.nix diff --git a/pkgs/development/python-modules/quart-cors/default.nix b/pkgs/development/python-modules/quart-cors/default.nix new file mode 100644 index 000000000000..8ffe47b4eda4 --- /dev/null +++ b/pkgs/development/python-modules/quart-cors/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder + +# build-system +, poetry-core + +# propagates +, quart +, typing-extensions + +# tests +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "quart-cors"; + version = "0.6.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "pgjones"; + repo = "quart-cors"; + rev = "refs/tags/${version}"; + hash = "sha256-SbnYrpeyEn47JgP9p3Us0zfkjC1sJ7jPPUIHYHAiSgc="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--no-cov-on-fail " "" + ''; + + propagatedBuildInputs = [ + quart + ] ++ lib.optionals (pythonOlder "3.10") [ + typing-extensions + ]; + + pythonImportsCheck = [ + "quart_cors" + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Quart-CORS is an extension for Quart to enable and control Cross Origin Resource Sharing, CORS"; + homepage = "https://github.com/pgjones/quart-cors/"; + changelog = "https://github.com/pgjones/quart-cors/blob/${src.rev}/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e2599ae64dc9..d208aac4f307 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9959,6 +9959,8 @@ self: super: with self; { quart = callPackage ../development/python-modules/quart { }; + quart-cors = callPackage ../development/python-modules/quart-cors { }; + querystring_parser = callPackage ../development/python-modules/querystring-parser { }; questionary = callPackage ../development/python-modules/questionary { };