summary refs log tree commit diff
path: root/pkgs/development/python-modules/mako/default.nix
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-19 17:28:43 +0000
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-19 21:36:02 +0100
commit9e7f9a402b3176d2a866b883f64878d196690792 (patch)
tree01b2c6265857df68ee00adf1cfb8f696538b2dd1 /pkgs/development/python-modules/mako/default.nix
parent0981423ea1a6991121d004a74bca498df78ec062 (diff)
downloadnixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.tar
nixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.tar.gz
nixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.tar.bz2
nixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.tar.lz
nixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.tar.xz
nixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.tar.zst
nixpkgs-9e7f9a402b3176d2a866b883f64878d196690792.zip
python310Packages.mako: Normalize attribute, pname, dirname
Diffstat (limited to 'pkgs/development/python-modules/mako/default.nix')
-rw-r--r--pkgs/development/python-modules/mako/default.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/mako/default.nix b/pkgs/development/python-modules/mako/default.nix
new file mode 100644
index 00000000000..33b5bd2e512
--- /dev/null
+++ b/pkgs/development/python-modules/mako/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+, isPyPy
+
+# propagates
+, markupsafe
+
+# extras: Babel
+, babel
+
+# tests
+, mock
+, pytestCheckHook
+, lingua
+, chameleon
+}:
+
+buildPythonPackage rec {
+  pname = "mako";
+  version = "1.2.4";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    pname = "Mako";
+    inherit version;
+    sha256 = "sha256-1go5A9w7sBoYrWqJzb4uTq3GnAvI7x43c7pT1Ew/ejQ=";
+  };
+
+  propagatedBuildInputs = [
+    markupsafe
+  ];
+
+  passthru.optional-dependencies = {
+    babel = [
+      babel
+    ];
+  };
+
+  nativeCheckInputs = [
+    chameleon
+    lingua
+    mock
+    pytestCheckHook
+  ] ++ passthru.optional-dependencies.babel;
+
+  disabledTests = lib.optionals isPyPy [
+    # https://github.com/sqlalchemy/mako/issues/315
+    "test_alternating_file_names"
+    # https://github.com/sqlalchemy/mako/issues/238
+    "test_file_success"
+    "test_stdin_success"
+    # fails on pypy2.7
+    "test_bytestring_passthru"
+  ];
+
+  meta = with lib; {
+    description = "Super-fast templating language";
+    homepage = "https://www.makotemplates.org/";
+    changelog = "https://docs.makotemplates.org/en/latest/changelog.html";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ domenkozar ];
+  };
+}