From 6865699e3963b243790df841c4c85a7f263d0e23 Mon Sep 17 00:00:00 2001 From: pennae Date: Thu, 19 Jan 2023 16:23:34 +0100 Subject: [PATCH] markdown-it-py, mdit-py-plugins: allow disabling the test suite the test suite pulls in a huge number of dependencies, from cryptography over sphinx to zope. since we want to use markdown-it-py in the nixos manual build and closure size is important we'll skip the test suite for the manual and rely on the regular builds to catch test failures. it's not ideal, but markdown-it-py is the closes thing to the official MyST parser we can get right now. --- pkgs/development/python-modules/markdown-it-py/default.nix | 4 ++++ pkgs/development/python-modules/mdit-py-plugins/default.nix | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/markdown-it-py/default.nix b/pkgs/development/python-modules/markdown-it-py/default.nix index 1f2bc34b000b..c1c5da228f0f 100644 --- a/pkgs/development/python-modules/markdown-it-py/default.nix +++ b/pkgs/development/python-modules/markdown-it-py/default.nix @@ -12,6 +12,9 @@ , pytestCheckHook , pythonOlder , typing-extensions +# allow disabling tests for the nixos manual build. +# the test suite closure is just too large. +, disableTests ? false }: buildPythonPackage rec { @@ -43,6 +46,7 @@ buildPythonPackage rec { nativeCheckInputs = [ psutil py + ] ++ lib.optionals (! disableTests) [ pytest-benchmark pytest-regressions pytestCheckHook diff --git a/pkgs/development/python-modules/mdit-py-plugins/default.nix b/pkgs/development/python-modules/mdit-py-plugins/default.nix index 291ea54c56bc..f93751ca71d5 100644 --- a/pkgs/development/python-modules/mdit-py-plugins/default.nix +++ b/pkgs/development/python-modules/mdit-py-plugins/default.nix @@ -6,6 +6,9 @@ , markdown-it-py , pytest-regressions , pytestCheckHook +# allow disabling tests for the nixos manual build. +# the test suite closure is just too large. +, disableTests ? false }: buildPythonPackage rec { @@ -30,7 +33,7 @@ buildPythonPackage rec { markdown-it-py ]; - nativeCheckInputs = [ + nativeCheckInputs = lib.optionals (!disableTests) [ pytestCheckHook pytest-regressions ];