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