Merge pull request #179470 from fabaff/mkdocstrings

python310Packages.mkdocstrings: init at 0.19.0
This commit is contained in:
Fabian Affolter 2022-06-29 09:09:58 +02:00 committed by GitHub
commit 94b69ec34b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 241 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{ lib
, aiofiles
, buildPythonApplication
, cached-property
, fetchFromGitHub
, git
, pdm-pep517
, pytestCheckHook
, pythonOlder
}:
buildPythonApplication rec {
pname = "griffe";
version = "0.21.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mkdocstrings";
repo = pname;
rev = version;
hash = "sha256-yhhEcPwh1AjMtDlPZVDR69WX/728wuKqdJdc+yv/o4c=";
};
nativeBuildInputs = [
pdm-pep517
];
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
cached-property
];
checkInputs = [
git
pytestCheckHook
];
passthru.optional-dependencies = {
async = [
aiofiles
];
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'dynamic = ["version"]' 'version = "${version}"'
'';
pythonImportsCheck = [
"griffe"
];
meta = with lib; {
description = "Signatures for entire Python programs";
homepage = "https://github.com/mkdocstrings/griffe";
license = licenses.isc;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,53 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, markdown
, mkdocs
, pytestCheckHook
, pdm-pep517
, pythonOlder
}:
buildPythonApplication rec {
pname = "mkdocs-autorefs";
version = "0.4.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mkdocstrings";
repo = "autorefs";
rev = version;
sha256 = "sha256-kiHb/XSFw6yaUbLJHBvHaQAOVUM6UfyFeomgniDZqgU=";
};
nativeBuildInputs = [
pdm-pep517
];
propagatedBuildInputs = [
markdown
mkdocs
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'dynamic = ["version"]' 'version = "${version}"'
'';
pythonImportsCheck = [
"mkdocs_autorefs"
];
meta = with lib; {
description = "Automatically link across pages in MkDocs";
homepage = "https://github.com/mkdocstrings/autorefs/";
license = licenses.isc;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,55 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, griffe
, mkdocs-material
, mkdocstrings
, pdm-pep517
, pytestCheckHook
, pythonOlder
}:
buildPythonApplication rec {
pname = "mkdocstrings-python";
version = "0.7.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mkdocstrings";
repo = "python";
rev = version;
hash = "sha256-cZk6Eu6Jp3tSPAb0HplR/I0pX2YIFhOaAsI3YRS0LVw=";
};
nativeBuildInputs = [
pdm-pep517
];
propagatedBuildInputs = [
griffe
mkdocstrings
];
checkInputs = [
mkdocs-material
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'dynamic = ["version"]' 'version = "${version}"'
'';
pythonImportsCheck = [
"mkdocstrings_handlers"
];
meta = with lib; {
description = "Python handler for mkdocstrings";
homepage = "https://github.com/mkdocstrings/python";
license = licenses.isc;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,66 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, jinja2
, markdown
, markupsafe
, mkdocs
, mkdocs-autorefs
, pymdown-extensions
, pytestCheckHook
, pdm-pep517
, pythonOlder
}:
buildPythonApplication rec {
pname = "mkdocstrings";
version = "0.19.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mkdocstrings";
repo = pname;
rev = version;
sha256 = "sha256-7OF1CrRnE4MYHuYD/pasnZpLe9lrbieGp4agnWAaKVo=";
};
nativeBuildInputs = [
pdm-pep517
];
propagatedBuildInputs = [
jinja2
markdown
markupsafe
mkdocs
mkdocs-autorefs
pymdown-extensions
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'dynamic = ["version"]' 'version = "${version}"'
'';
pythonImportsCheck = [
"mkdocstrings"
];
disabledTestPaths = [
# Circular dependencies
"tests/test_extension.py"
];
meta = with lib; {
description = "Automatic documentation from sources for MkDocs";
homepage = "https://github.com/mkdocstrings/mkdocstrings";
license = licenses.isc;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -3789,6 +3789,8 @@ in {
gridnet = callPackage ../development/python-modules/gridnet { };
griffe = callPackage ../development/python-modules/griffe { };
grip = callPackage ../development/python-modules/grip { };
groestlcoin_hash = callPackage ../development/python-modules/groestlcoin_hash { };
@ -5440,6 +5442,7 @@ in {
mizani = callPackage ../development/python-modules/mizani { };
mkdocs = callPackage ../development/python-modules/mkdocs { };
mkdocs-autorefs = callPackage ../development/python-modules/mkdocs-autorefs { };
mkdocs-drawio-exporter = callPackage ../development/python-modules/mkdocs-drawio-exporter { };
mkdocs-exclude = callPackage ../development/python-modules/mkdocs-exclude { };
mkdocs-gitlab = callPackage ../development/python-modules/mkdocs-gitlab-plugin { };
@ -5449,6 +5452,10 @@ in {
mkdocs-minify = callPackage ../development/python-modules/mkdocs-minify { };
mkdocs-redirects = callPackage ../development/python-modules/mkdocs-redirects { };
mkdocstrings = callPackage ../development/python-modules/mkdocstrings { };
mkdocstrings-python = callPackage ../development/python-modules/mkdocstrings-python { };
mkl-service = callPackage ../development/python-modules/mkl-service { };
ml-collections = callPackage ../development/python-modules/ml-collections { };