From 1ef616a56cd1d3f8843528756ce45e4c2c19fd56 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 30 Oct 2022 21:09:56 +0100 Subject: [PATCH] python310Packages.bleach: add optional-dependencies --- .../python-modules/bleach/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/bleach/default.nix b/pkgs/development/python-modules/bleach/default.nix index 06cefc9bbb0d..de3caef7b0d2 100644 --- a/pkgs/development/python-modules/bleach/default.nix +++ b/pkgs/development/python-modules/bleach/default.nix @@ -5,14 +5,16 @@ , six , html5lib , setuptools +, tinycss2 , packaging , pythonOlder +, webencodings }: buildPythonPackage rec { pname = "bleach"; version = "5.0.1"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -20,12 +22,19 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - packaging - six html5lib + packaging setuptools + six + webencodings ]; + passthru.optional-dependencies = { + css = [ + tinycss2 + ]; + }; + checkInputs = [ pytestCheckHook ]; @@ -35,7 +44,9 @@ buildPythonPackage rec { "protocols" ]; - pythonImportsCheck = [ "bleach" ]; + pythonImportsCheck = [ + "bleach" + ]; meta = with lib; { description = "An easy, HTML5, whitelisting HTML sanitizer";