python312Packages.mdformat: refactor (#372674)
This commit is contained in:
@@ -3,13 +3,18 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
flit-core,
|
||||
mdformat,
|
||||
mdformat-beautysh,
|
||||
mdformat-footnote,
|
||||
mdformat-frontmatter,
|
||||
mdformat-gfm,
|
||||
mdformat-simple-breaks,
|
||||
mdformat-tables,
|
||||
mdformat,
|
||||
mdit-py-plugins,
|
||||
more-itertools,
|
||||
pythonOlder,
|
||||
pytest-snapshot,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -35,6 +40,20 @@ buildPythonPackage rec {
|
||||
more-itertools
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
recommended = [
|
||||
mdformat-beautysh
|
||||
# mdformat-config
|
||||
mdformat-footnote
|
||||
mdformat-frontmatter
|
||||
# mdformat-ruff
|
||||
mdformat-simple-breaks
|
||||
mdformat-tables
|
||||
# mdformat-web
|
||||
# mdformat-wikilink
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-snapshot
|
||||
pytestCheckHook
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
importlib-metadata,
|
||||
markdown-it-py,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
tomli,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -15,7 +13,7 @@ buildPythonPackage rec {
|
||||
version = "0.7.22";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
disabled = pythonOlder "3.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "executablebooks";
|
||||
@@ -26,10 +24,7 @@ buildPythonPackage rec {
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies =
|
||||
[ markdown-it-py ]
|
||||
++ lib.optionals (pythonOlder "3.11") [ tomli ]
|
||||
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
|
||||
dependencies = [ markdown-it-py ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user