diff --git a/pkgs/development/python-modules/sgmllib3k/default.nix b/pkgs/development/python-modules/sgmllib3k/default.nix index 1104c843c6ee..c4b0d9bdb94d 100644 --- a/pkgs/development/python-modules/sgmllib3k/default.nix +++ b/pkgs/development/python-modules/sgmllib3k/default.nix @@ -2,14 +2,17 @@ , buildPythonPackage , fetchFromGitHub , isPy27 +, pytestCheckHook +, pythonAtLeast }: buildPythonPackage rec { pname = "sgmllib3k"; version = "1.0.0"; + format = "setuptools"; + disabled = isPy27; - # fetchFromGitHub instead of fetchPypi to run tests. src = fetchFromGitHub { owner = "hsoft"; repo = "sgmllib"; @@ -17,6 +20,18 @@ buildPythonPackage rec { sha256 = "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"; }; + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + "test_declaration_junk_chars" + ]; + + pythonImportsCheck = [ + "sgmllib" + ]; + meta = with lib; { homepage = "https://pypi.org/project/sgmllib3k/"; description = "Python 3 port of sgmllib";