From nobody Thu Aug 31 05:47:48 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rbqv9154sz4rlWF; Thu, 31 Aug 2023 05:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbqv905ybz4HxC; Thu, 31 Aug 2023 05:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693460869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GmwNOW1LeIrxW2nM7VsIrSmjVg9OhnBGqK6WK+ojP1Y=; b=i7WFhYceEl/E0HXNjSu3YaFn/uzpXu6NWHE2PJ/fn/T8DgwOtE6aR8bxua4LyHIWXC25yU FbTcje/vBK9PovKpM7cbEiHC3ZThxQ7IcYl2JhqUdN9K45fv/QdyPqwNkmK4q/DiIoZfpF 0zcyvm+qUJeq615muliSQSz4aTfyLj7+e2kNOJ9MuNwYHFCNuRYAeeyhEMjS2BnGtMj1HZ SAoifrFCcqv7YWofbJI7UhnKuu5kTA5NhPONd6CUNdpxKH6vrHaBoLCTEkimHH8IiOf29i +9VHCV6QPaZszDvwopviIN0ld0/Bs2u0xHoa+iD5McnqW4a8LvRXdZBYAmI8yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693460869; a=rsa-sha256; cv=none; b=G7dHfFwPiaCBMCXjbfI8Ws0WUsFd28344yysZxflEecjZbhVALGxm+qV6cJuzUnq+m2oG7 pXLmPL27NXDFrcATe0K6BqqmtU1bOzqDGt6tMLEF4CqJuWyxY89v8HGhXzFzn52Y/O3mRe gpNKzdZwj2j8zjdfLPWwoVh5nJtMjhN4F7uKnBSiAi7LY+U5H7yAKWXf6Hf9t+UewAJdIa TUv/vXJWfyGBXp/hMbrwjM2rCvM8jKvVk4ZuXgbnIOoIwNx1JCexPsT7rRSk7lJ9yebccT J6rqI+GxCJKJIUQhTYm9soDJJoyXBtd96mvJcw+peEH1ZWhYul6fis6p767A3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693460869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GmwNOW1LeIrxW2nM7VsIrSmjVg9OhnBGqK6WK+ojP1Y=; b=wyYoS5yDLW8pxmqmLpKWUcyAOY+Ot21Ze0XLA+2llh0ByUMb+VgJC1tQNmbvQ4DzWWYtn0 ethcyXvTcAwYAIO93uO7Z5Qmn5LMUOYj0IZetrk2NpPPkqenDutvWgTKRPUh9Pq0hKRQm5 L5OYgfQJalBsQaa4rEhqv9+nluEwlR1lFrX3gfkcdAV5P7R4w10zQu4pTCOH0rSxqpo6qm foYL5Eg8RjfqvT+lMw2Qjtu6CGcJQuYILUUExKv/4CixK6RRpwOz+kwwsX+Mvjli7KVfsG 6HmKYred1ma8b4kxJhCVFfMvsUjXun3nBEdu4WYr4v2kkNpFsuZd8LRBVmkJag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rbqv868W0z14yF; Thu, 31 Aug 2023 05:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V5lmiW068299; Thu, 31 Aug 2023 05:47:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V5lmH9068296; Thu, 31 Aug 2023 05:47:48 GMT (envelope-from git) Date: Thu, 31 Aug 2023 05:47:48 GMT Message-Id: <202308310547.37V5lmH9068296@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kai Knoblich Subject: git: 656e2aeca877 - main - textproc/py-mkdocstrings-python: New port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kai X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 656e2aeca87724087da0235269e9d7ae1e6118e8 Auto-Submitted: auto-generated The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=656e2aeca87724087da0235269e9d7ae1e6118e8 commit 656e2aeca87724087da0235269e9d7ae1e6118e8 Author: Kai Knoblich AuthorDate: 2023-08-31 05:22:23 +0000 Commit: Kai Knoblich CommitDate: 2023-08-31 05:43:40 +0000 textproc/py-mkdocstrings-python: New port This Python handler for the "mkdocstrings" package uses Griffe (= textproc/py-griffe) 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 Griffe. * Support for type annotations: Griffe collects your type annotations and mkdocstrings uses them to display parameter types or return types. * Recursive documentation of Python objects: just use the module dotted-path as an 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. See Griffe's documentation on docstrings support. --- textproc/Makefile | 1 + textproc/py-mkdocstrings-python/Makefile | 33 +++++++++++++++++++++++++++++++ textproc/py-mkdocstrings-python/distinfo | 3 +++ textproc/py-mkdocstrings-python/pkg-descr | 22 +++++++++++++++++++++ 4 files changed, 59 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index 44d82be858bc..e9ee6ca2a756 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1438,6 +1438,7 @@ SUBDIR += py-mkdocs-simple-hooks SUBDIR += py-mkdocstrings SUBDIR += py-mkdocstrings-crystal + SUBDIR += py-mkdocstrings-python SUBDIR += py-morse3 SUBDIR += py-mwparserfromhell SUBDIR += py-myst-parser diff --git a/textproc/py-mkdocstrings-python/Makefile b/textproc/py-mkdocstrings-python/Makefile new file mode 100644 index 000000000000..00b48cd5653b --- /dev/null +++ b/textproc/py-mkdocstrings-python/Makefile @@ -0,0 +1,33 @@ +PORTNAME= mkdocstrings-python +DISTVERSION= 1.6.0 +CATEGORIES= textproc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= mkdocstrings_python-${DISTVERSION} + +MAINTAINER= kai@FreeBSD.org +COMMENT= Python handler for mkdocstrings +WWW= https://github.com/mkdocstrings/python + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pdm-backend>0:devel/py-pdm-backend@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}griffe>=0.35:textproc/py-griffe@${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' PYTHON option). It was therefore +# moved to TEST_DEPENDS to at least allow the test suite to run. + +USES= python +USE_PYTHON= autoplist pep517 pytest +# These tests relies on files that aren't available in the sdist +PYTEST_IGNORED_TESTS= test_render_themes test_render_docstring + +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}mkdocstrings-python-legacy + +NO_ARCH= yes + +.include diff --git a/textproc/py-mkdocstrings-python/distinfo b/textproc/py-mkdocstrings-python/distinfo new file mode 100644 index 000000000000..24927e75743e --- /dev/null +++ b/textproc/py-mkdocstrings-python/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1693377377 +SHA256 (mkdocstrings_python-1.6.0.tar.gz) = 6164ccaa6e488abc2a8fbccdfd1f21948c2c344d3f347847783a5d1c6fa2bfbf +SIZE (mkdocstrings_python-1.6.0.tar.gz) = 29909 diff --git a/textproc/py-mkdocstrings-python/pkg-descr b/textproc/py-mkdocstrings-python/pkg-descr new file mode 100644 index 000000000000..d5f664a96b83 --- /dev/null +++ b/textproc/py-mkdocstrings-python/pkg-descr @@ -0,0 +1,22 @@ +This Python handler for the "mkdocstrings" package uses Griffe +(= textproc/py-griffe) 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 Griffe. + +* Support for type annotations: Griffe collects your type annotations and + mkdocstrings uses them to display parameter types or return types. + +* Recursive documentation of Python objects: just use the module dotted-path as + an 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. See Griffe's documentation on + docstrings support.