From ed28d79fd468d1da51d7341395c2846f11fd1bf0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 26 Feb 2023 22:12:53 +0000 Subject: [PATCH] python310Packages.django-markup: init at 1.6 A generic Django application to convert text with specific markup to html. --- .../python-modules/django-markup/default.nix | 75 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 77 insertions(+) create mode 100644 pkgs/development/python-modules/django-markup/default.nix diff --git a/pkgs/development/python-modules/django-markup/default.nix b/pkgs/development/python-modules/django-markup/default.nix new file mode 100644 index 000000000000..d54936c55539 --- /dev/null +++ b/pkgs/development/python-modules/django-markup/default.nix @@ -0,0 +1,75 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, django + +# optionals +, bleach +, docutils +, markdown +, pygments +, python-creole +, smartypants +, textile + +# tests +, pytest-django +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "django-markup"; + version = "1.6"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "bartTC"; + repo = "django-markup"; + rev = "refs/tags/v${version}"; + hash = "sha256-Hh+3KxFE6sSIqRowyZ1Pz6NmBaTbltZaEhSjFrw760Q="; + }; + + postPatch = '' + sed -i "/--cov/d" setup.cfg + ''; + + buildInputs = [ + django + ]; + + passthru.optional-dependencies = { + all_filter_dependencies = [ + bleach + docutils + markdown + pygments + python-creole + smartypants + textile + ]; + }; + + pythonImportsCheck = [ + "django_markup" + ]; + + nativeCheckInputs = [ + pytest-django + pytestCheckHook + ] ++ passthru.optional-dependencies.all_filter_dependencies; + + env.DJANGO_SETTINGS_MODULE = "django_markup.tests"; + + disabledTests = [ + # https://github.com/bartTC/django-markup/issues/40 + "test_rst_with_pygments" + ]; + + meta = with lib; { + description = "Generic Django application to convert text with specific markup to html."; + homepage = "https://github.com/bartTC/django-markup"; + changelog = "https://github.com/bartTC/django-markup/blob/v${version}/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c48c4b96bf83..63e3331202f3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2665,6 +2665,8 @@ self: super: with self; { django-mailman3 = callPackage ../development/python-modules/django-mailman3 { }; + django-markup = callPackage ../development/python-modules/django-markup { }; + django-model-utils = callPackage ../development/python-modules/django-model-utils { }; django-modelcluster = callPackage ../development/python-modules/django_modelcluster { };