From 59531cc1c59aa557ea183237e75672306e718f21 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Thu, 16 Jan 2025 16:38:04 +0100 Subject: [PATCH] python3Packages.typogrify: 2.0.7 -> 2.1.0 Justin Mayer took over maintenance, and the former repo now links to his one. Typogrify has been updated to use pyproject.toml. Tests can now be enabled as well without encountering problems. --- .../python-modules/typogrify/default.nix | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/typogrify/default.nix b/pkgs/development/python-modules/typogrify/default.nix index a2a17791eaa9..333814717e69 100644 --- a/pkgs/development/python-modules/typogrify/default.nix +++ b/pkgs/development/python-modules/typogrify/default.nix @@ -1,31 +1,44 @@ { lib, buildPythonPackage, + pythonOlder, fetchPypi, smartypants, + hatchling, + pytestCheckHook, }: buildPythonPackage rec { pname = "typogrify"; - version = "2.0.7"; + version = "2.1.0"; + pyproject = true; - format = "setuptools"; + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - sha256 = "8be4668cda434163ce229d87ca273a11922cb1614cb359970b7dc96eed13cb38"; + hash = "sha256-8KoATpgDKm5r5MnaZefrcVDjbKO/UIrbzagrTQA+Ye4="; }; - propagatedBuildInputs = [ smartypants ]; + build-system = [ hatchling ]; - # Wants to set up Django - doCheck = false; + dependencies = [ smartypants ]; pythonImportsCheck = [ "typogrify.filters" ]; + pytestFlagsArray = [ + "--doctest-modules" + "typogrify/filters.py" + "typogrify/packages/titlecase/tests.py" + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + meta = with lib; { description = "Filters to enhance web typography, including support for Django & Jinja templates"; - homepage = "https://github.com/mintchaos/typogrify"; + homepage = "https://github.com/justinmayer/typogrify"; license = licenses.bsd3; maintainers = with maintainers; [ dotlambda ]; };