Date: Thu, 31 Aug 2023 05:47:49 GMT From: Kai Knoblich <kai@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: e1c6e80783e1 - main - textproc/py-mkdocstrings-python-legacy: New port Message-ID: <202308310547.37V5lneJ068338@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=e1c6e80783e10e0716b5cab7b1b0448d5f48f7ca commit e1c6e80783e10e0716b5cab7b1b0448d5f48f7ca Author: Kai Knoblich <kai@FreeBSD.org> AuthorDate: 2023-08-31 05:25:26 +0000 Commit: Kai Knoblich <kai@FreeBSD.org> CommitDate: 2023-08-31 05:44:11 +0000 textproc/py-mkdocstrings-python-legacy: New port This Python handler for the "mkdocstrings" package uses PyTkDocs (= textproc/py-pytkdocs) to collect documentation from Python source code. Features: * Data collection from source code: collection of the object-tree and the docstrings is done thanks to pytkdocs. * Support for type annotations: pytkdocs collects your type annotations and mkdocstrings uses them to display parameters types or return types. * Recursive documentation of Python objects: just use the module dotted-path as identifier, and you get the full module docs. You don't need to inject documentation for each class, function, etc. * Support for documented attributes: attributes (variables) followed by a docstring (triple-quoted string) will be recognized by Griffe in modules, classes and even in __init__ methods. * Multiple docstring-styles support: common support for Google-style, Numpydoc-style, and Sphinx-style docstrings. --- textproc/Makefile | 1 + textproc/py-mkdocstrings-python-legacy/Makefile | 31 ++++++++++++++++++++++ textproc/py-mkdocstrings-python-legacy/distinfo | 3 +++ .../files/patch-pyproject.toml | 23 ++++++++++++++++ textproc/py-mkdocstrings-python-legacy/pkg-descr | 21 +++++++++++++++ 5 files changed, 79 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index e9ee6ca2a756..b9bc40227ec9 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1439,6 +1439,7 @@ SUBDIR += py-mkdocstrings SUBDIR += py-mkdocstrings-crystal SUBDIR += py-mkdocstrings-python + SUBDIR += py-mkdocstrings-python-legacy SUBDIR += py-morse3 SUBDIR += py-mwparserfromhell SUBDIR += py-myst-parser diff --git a/textproc/py-mkdocstrings-python-legacy/Makefile b/textproc/py-mkdocstrings-python-legacy/Makefile new file mode 100644 index 000000000000..c6ceaa599bea --- /dev/null +++ b/textproc/py-mkdocstrings-python-legacy/Makefile @@ -0,0 +1,31 @@ +PORTNAME= mkdocstrings-python-legacy +DISTVERSION= 0.2.3 +CATEGORIES= textproc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= kai@FreeBSD.org +COMMENT= Legacy Python handler for mkdocstrings +WWW= https://github.com/mkdocstrings/python-legacy + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pdm-pep517>0:devel/py-pdm-pep517@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytkdocs>=0.14:textproc/py-pytkdocs@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mkdocstrings>0:textproc/py-mkdocstrings@${PY_FLAVOR} +# textproc/py-mkdocstrings belongs to RUN_DEPENDS as well but would cause +# a circular dependency (via py-mkdocstrings' PYTHONLEGACY option). It was +# therefore # moved to TEST_DEPENDS to at least allow the test suite to run. + +USES= python +USE_PYTHON= autoplist pep517 pytest +PYTEST_IGNORED_TESTS= render_themes + +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}mkdocstrings-python + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/textproc/py-mkdocstrings-python-legacy/distinfo b/textproc/py-mkdocstrings-python-legacy/distinfo new file mode 100644 index 000000000000..4cf7018cef74 --- /dev/null +++ b/textproc/py-mkdocstrings-python-legacy/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1688218792 +SHA256 (mkdocstrings-python-legacy-0.2.3.tar.gz) = 3fb58fdabe19c6b52b8bb1d3bb1540b1cd527b562865468d6754e8cd1201050c +SIZE (mkdocstrings-python-legacy-0.2.3.tar.gz) = 18779 diff --git a/textproc/py-mkdocstrings-python-legacy/files/patch-pyproject.toml b/textproc/py-mkdocstrings-python-legacy/files/patch-pyproject.toml new file mode 100644 index 000000000000..117ead8b89a1 --- /dev/null +++ b/textproc/py-mkdocstrings-python-legacy/files/patch-pyproject.toml @@ -0,0 +1,23 @@ +Workaround to prevent following error: + +[...] + File "/usr/local/lib/python3.9/site-packages/pdm/pep517/metadata.py", line 58, in validate + return validate_pep621(self.data, raising) + File "/usr/local/lib/python3.9/site-packages/pdm/pep517/validator.py", line 85, in validate_pep621 + raise PEP621ValidationError(validator.errors) +pdm.pep517.exceptions.PEP621ValidationError: {'license-expression': ['unknown field']} + +ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel +*** Error code 1 +[...] + +--- pyproject.toml.orig 2022-05-28 13:34:29 UTC ++++ pyproject.toml +@@ -10,7 +10,6 @@ authors = [ + authors = [ + { name = "Timothée Mazzucotelli", email = "pawamoy@pm.me" }, + ] +-license-expression = "ISC" + readme = "README.md" + requires-python = ">=3.7" + keywords = [] diff --git a/textproc/py-mkdocstrings-python-legacy/pkg-descr b/textproc/py-mkdocstrings-python-legacy/pkg-descr new file mode 100644 index 000000000000..f02e2f73ebd8 --- /dev/null +++ b/textproc/py-mkdocstrings-python-legacy/pkg-descr @@ -0,0 +1,21 @@ +This Python handler for the "mkdocstrings" package uses PyTkDocs +(= textproc/py-pytkdocs) to collect documentation from Python source code. + +Features: + +* Data collection from source code: collection of the object-tree and the + docstrings is done thanks to pytkdocs. + +* Support for type annotations: pytkdocs collects your type annotations and + mkdocstrings uses them to display parameters types or return types. + +* Recursive documentation of Python objects: just use the module dotted-path as + identifier, and you get the full module docs. You don't need to inject + documentation for each class, function, etc. + +* Support for documented attributes: attributes (variables) followed by a + docstring (triple-quoted string) will be recognized by Griffe in modules, + classes and even in __init__ methods. + +* Multiple docstring-styles support: common support for Google-style, + Numpydoc-style, and Sphinx-style docstrings.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308310547.37V5lneJ068338>