From 85673d5f0b86d3b293116a3b33a42ebe86dbde0f Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Wed, 11 Feb 2026 13:11:45 +0100 Subject: gnu: Add python-jinja2-fragments. * gnu/packages/patches/python-jinja2-fragments-modify-conftest-py.patch: New file * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python-xyz.scm (python-jinja2-fragments): New variable. Merges: https://codeberg.org/guix/guix/pulls/6321 Change-Id: I03a88537cea8e769a33ddfe50b418b5b518e5854 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 53ad01fe004..b5903ef1246 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -66,7 +66,7 @@ ;;; Copyright © 2019 Jacob MacDonald ;;; Copyright © 2019-2021, 2023, 2024, 2026 Giacomo Leidi ;;; Copyright © 2019 Wiktor Żelazny -;;; Copyright © 2019, 2020, 2021, 2022 Tanguy Le Carrour +;;; Copyright © 2019, 2020, 2021, 2022, 2026 Tanguy Le Carrour ;;; Copyright © 2019, 2021-2023 Mădălin Ionel Patrașcu ;;; Copyright © 2020 Riku Viitanen ;;; Copyright © 2020 Jakub Kądziołka @@ -8844,6 +8844,44 @@ for Python.") written in pure Python.") (license license:bsd-3))) +(define-public python-jinja2-fragments + (package + (name "python-jinja2-fragments") + (version "1.11.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sponsfreixes/jinja2-fragments") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14qr0ppllq296c1y2i5ly8l4y97q8msin5khlpli3akgrzsnvmkl")) + (patches + ;; Remove test setup code related to `litestar` and `sanic` + (search-patches "python-jinja2-fragments-modify-conftest-py.patch")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--ignore=tests/test_litestar.py" + "--ignore=tests/test_sanic.py"))) + (native-inputs + (list python-fastapi + python-flask + python-pytest + python-pytest-asyncio + python-quart + python-setuptools)) + (propagated-inputs + (list python-jinja2)) + (home-page "https://github.com/sponsfreixes/jinja2-fragments") + (synopsis "Jinja2 extension for template fragments") + (description + "Render Jinja2 template block as HTML page fragments on Python web +frameworks.") + (license license:expat))) + (define-public python-pypugjs (package (name "python-pypugjs") -- cgit v1.3