about summary refs log tree commit diff
path: root/pkgs/development/python-modules/jinja2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/jinja2/default.nix')
-rw-r--r--pkgs/development/python-modules/jinja2/default.nix72
1 files changed, 40 insertions, 32 deletions
diff --git a/pkgs/development/python-modules/jinja2/default.nix b/pkgs/development/python-modules/jinja2/default.nix
index 1c260e37c7b0..995f436a8242 100644
--- a/pkgs/development/python-modules/jinja2/default.nix
+++ b/pkgs/development/python-modules/jinja2/default.nix
@@ -1,53 +1,57 @@
-{ lib
-, stdenv
-, python
-, buildPythonPackage
-, pythonOlder
-, fetchPypi
-, babel
-, markupsafe
-, pytestCheckHook
-, sphinxHook
-, pallets-sphinx-themes
-, setuptools
-, sphinxcontrib-log-cabinet
-, sphinx-issues
+{
+  lib,
+  stdenv,
+  python,
+  pythonAtLeast,
+  buildPythonPackage,
+  pythonOlder,
+  fetchPypi,
+  flit-core,
+  babel,
+  markupsafe,
+  pytestCheckHook,
+  sphinxHook,
+  pallets-sphinx-themes,
+  sphinxcontrib-log-cabinet,
+  sphinx-issues,
+
+  # Reverse dependency
+  sage,
 }:
 
 buildPythonPackage rec {
   pname = "jinja2";
-  version = "3.1.3";
+  version = "3.1.4";
   pyproject = true;
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
-    pname = "Jinja2";
-    inherit version;
-    hash = "sha256-rIvWVE1Lssl5K/OhWegLuo/afwfoG8Ou1WVDLVklupA=";
+    inherit pname version;
+    hash = "sha256-Sjruesu+cwOu3o6WSNE7i/iKQpKCqmEiqZPwrIAMs2k=";
   };
 
-  nativeBuildInputs = [
-    setuptools
-  ];
+  nativeBuildInputs = [ flit-core ];
 
-  propagatedBuildInputs = [
-    markupsafe
-  ];
+  propagatedBuildInputs = [ markupsafe ];
 
-  passthru.optional-dependencies = {
-    i18n = [
-      babel
-    ];
+  optional-dependencies = {
+    i18n = [ babel ];
   };
 
   # Multiple tests run out of stack space on 32bit systems with python2.
   # See https://github.com/pallets/jinja/issues/1158
-  doCheck = !stdenv.is32bit;
+  doCheck = !stdenv.hostPlatform.is32bit;
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ] ++ passthru.optional-dependencies.i18n;
+  nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.i18n;
+
+  disabledTests = lib.optionals (pythonAtLeast "3.13") [
+    # https://github.com/pallets/jinja/issues/1900
+    "test_custom_async_iteratable_filter"
+    "test_first"
+    "test_loop_errors"
+    "test_package_zip_list"
+  ];
 
   passthru.doc = stdenv.mkDerivation {
     # Forge look and feel of multi-output derivation as best as we can.
@@ -76,6 +80,10 @@ buildPythonPackage rec {
     inherit meta;
   };
 
+  passthru.tests = {
+    inherit sage;
+  };
+
   meta = with lib; {
     changelog = "https://github.com/pallets/jinja/blob/${version}/CHANGES.rst";
     description = "Very fast and expressive template engine";