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.
This commit is contained in:
pennae 2023-01-19 16:23:34 +01:00 committed by pennae
parent 248e1b957d
commit 6865699e39
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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
];