3
0
Fork 0
forked from mirrors/nixpkgs

python310Packages.markdown-it-py: properly separate optional dependencies, drop python 3.7-3.8 support

This commit is contained in:
Sandro Jäckel 2023-02-27 21:42:04 +01:00 committed by pennae
parent 2f0dc85819
commit 5549def360

View file

@ -1,17 +1,24 @@
{ lib
, attrs
, buildPythonPackage
, commonmark
, fetchFromGitHub
, flit-core
, linkify-it-py
, markdown
, mdurl
, psutil
, py
, pytest-benchmark
, mistletoe
, mistune
, myst-parser
, panflute
, pyyaml
, sphinx
, sphinx-book-theme
, sphinx-copybutton
, sphinx-design
, pytest-regressions
, pytestCheckHook
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
@ -33,17 +40,13 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
attrs
linkify-it-py
mdurl
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
nativeCheckInputs = [
pytest-regressions
pytestCheckHook
];
] ++ passthru.optional-dependencies.linkify;
# disable and remove benchmark tests
preCheck = ''
@ -54,6 +57,12 @@ buildPythonPackage rec {
"markdown_it"
];
passthru.optional-dependencies = {
compare = [ commonmark markdown mistletoe mistune panflute ];
linkify = [ linkify-it-py ];
rtd = [ attrs myst-parser pyyaml sphinx sphinx-copybutton sphinx-design sphinx-book-theme ];
};
meta = with lib; {
description = "Markdown parser in Python";
homepage = "https://markdown-it-py.readthedocs.io/";