public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Henri Gasc" <gasc@eurecom.fr>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/textual/, dev-python/textual/files/
Date: Mon, 11 Mar 2024 08:42:19 +0000 (UTC)	[thread overview]
Message-ID: <1710146526.30eaec69dfe9008d12847e35418bba0233a91b63.gasc@gentoo> (raw)

commit:     30eaec69dfe9008d12847e35418bba0233a91b63
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Mon Mar 11 08:41:25 2024 +0000
Commit:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
CommitDate: Mon Mar 11 08:42:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=30eaec69

dev-python/textual: add 0.52.1, drop 0.47.1

Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 dev-python/textual/Manifest                        |  2 +-
 dev-python/textual/files/fix-mkdocstrings.patch    | 33 +++++++++++++++++
 ...textual-0.47.1.ebuild => textual-0.52.1.ebuild} | 41 ++++++++++++----------
 3 files changed, 57 insertions(+), 19 deletions(-)

diff --git a/dev-python/textual/Manifest b/dev-python/textual/Manifest
index 14e206e3aa..c880c1485a 100644
--- a/dev-python/textual/Manifest
+++ b/dev-python/textual/Manifest
@@ -1 +1 @@
-DIST textual-0.47.1.gh.tar.gz 27860405 BLAKE2B f4047755d4faf7796ece4f8e08c409e4dc93ecd4eaa9543b6ca23b2824b8eb70c1e382509f55a15421eebd666f137c0ada7a4b99b6bc9d1f91f45ae2f251ddcf SHA512 f17684f8e822423164a6b549c261f5662b6997e9934e1c76f159610d1ed682e26d34e39ae22c3b8fe47e84c8b4a87cc6bd70e0121806b498ddda5ddb9f575bd1
+DIST textual-0.52.1.gh.tar.gz 27949270 BLAKE2B 3251df04137316b416b19ce91293034d226b5c54eaf4550578cc0b874a4ae4b1ab45578981ee98b41de04693b2d4fd43c55c8882f03bb8e8b35339faac2ffef7 SHA512 7eb8d54e7e18fab3d4013004d68c629b0f6a72258dc8e2c879c4ed54d32ca0e94594a992e25687d39356f61bd6a64372f67064d8888706bfa48df2e8ccce833d

diff --git a/dev-python/textual/files/fix-mkdocstrings.patch b/dev-python/textual/files/fix-mkdocstrings.patch
new file mode 100644
index 0000000000..a412fea238
--- /dev/null
+++ b/dev-python/textual/files/fix-mkdocstrings.patch
@@ -0,0 +1,33 @@
+diff --git a/docs/_templates/python/material/_base/class.html b/docs/_templates/python/material/_base/class.html
+index 120fe338f..731d2ae73 100644
+--- a/docs/_templates/python/material/_base/class.html
++++ b/docs/_templates/python/material/_base/class.html
+@@ -46,7 +46,7 @@
+       {% if "__init__" in class.members %}
+         {% with function = class.members["__init__"] %}
+           {% filter highlight(language="python", inline=False) -%}
+-            def {% filter format_signature(config.line_length) %}
++            def {% filter format_signature(function, config.line_length) %}
+ __init__{% include "signature.html" with context %}
+             {% endfilter %}:
+           {% endfilter %}
+diff --git a/docs/_templates/python/material/_base/function.html b/docs/_templates/python/material/_base/function.html
+index 58a4c37ad..c5e574ffa 100644
+--- a/docs/_templates/python/material/_base/function.html
++++ b/docs/_templates/python/material/_base/function.html
+@@ -37,7 +37,7 @@
+ 
+     {% if config.separate_signature %}
+       {% filter highlight(language="python", inline=False) %}
+-def {% filter format_signature(config.line_length) %}
++def {% filter format_signature(function, config.line_length) %}
+           {% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}
+           {% include "signature.html" with context %}
+         {% endfilter %}:
+diff --git a/docs/api/constants.md b/docs/api/constants.md
+index f4d97e8df..88aa35b2f 100644
+--- a/docs/api/constants.md
++++ b/docs/api/constants.md
+@@ -1 +1 @@
+-::: textuals.constants
++::: textual.constants

diff --git a/dev-python/textual/textual-0.47.1.ebuild b/dev-python/textual/textual-0.52.1.ebuild
similarity index 64%
rename from dev-python/textual/textual-0.47.1.ebuild
rename to dev-python/textual/textual-0.52.1.ebuild
index 65e553d1fa..b67924c3e5 100644
--- a/dev-python/textual/textual-0.47.1.ebuild
+++ b/dev-python/textual/textual-0.52.1.ebuild
@@ -3,12 +3,21 @@
 
 EAPI=8
 
-DOCS_BUILDER="mkdocs"
-DOCS_DIR="docs"
 DISTUTILS_USE_PEP517=poetry
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit distutils-r1 optfeature
+DOCS_BUILDER="mkdocs"
+DOCS_DEPEND="
+	dev-python/mkdocstrings
+	dev-python/mkdocstrings-python
+	dev-python/mkdocs-material
+	dev-python/mkdocs-exclude
+	dev-python/mkdocs-rss-plugin
+	dev-python/pytz
+"
+DOCS_INITIALIZE_GIT=1
+
+inherit distutils-r1 docs optfeature
 
 DESCRIPTION="Modern Text User Interface framework"
 HOMEPAGE="https://github.com/Textualize/textual https://pypi.org/project/textual/"
@@ -17,24 +26,13 @@ SRC_URI="https://github.com/Textualize/textual/archive/refs/tags/v${PV}.tar.gz -
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="doc test"
 
 RDEPEND="
-	>=dev-python/rich-13.3.3[${PYTHON_USEDEP}]
 	>=dev-python/markdown-it-py-2.1.0[${PYTHON_USEDEP}]
+	>=dev-python/rich-13.3.3[${PYTHON_USEDEP}]
 "
-
 BDEPEND="
 	test? (
-		dev-python/pytest-cov[${PYTHON_USEDEP}]
-		>=dev-python/mkdocs-1.3.0[${PYTHON_USEDEP}]
-		<dev-python/mkdocs-2.0.0[${PYTHON_USEDEP}]
-		dev-python/mkdocstrings[${PYTHON_USEDEP}]
-		dev-python/mkdocstrings-python[${PYTHON_USEDEP}]
-		>=dev-python/mkdocs-material-9.0.11[${PYTHON_USEDEP}]
-		<dev-python/mkdocs-material-10.0.0[${PYTHON_USEDEP}]
-		>=dev-python/time-machine-2.6.0[${PYTHON_USEDEP}]
-		<dev-python/time-machine-3.0.0[${PYTHON_USEDEP}]
 		dev-python/httpx[${PYTHON_USEDEP}]
 		>=dev-python/textual-dev-1.2.0[${PYTHON_USEDEP}]
 		<dev-python/textual-dev-2.0.0[${PYTHON_USEDEP}]
@@ -42,19 +40,26 @@ BDEPEND="
 		dev-python/griffe[${PYTHON_USEDEP}]
 	)
 "
-
 DEPEND="${RDEPEND}"
 
+PATCHES=("${FILESDIR}/fix-mkdocstrings.patch")
+
 distutils_enable_tests pytest
 EPYTEST_DESELECT=(
 	# Those tests ask to press keys
 	tests/snapshot_tests/test_snapshots.py
 
 	# Need a package that should be optional
-	tests/text_area/test_languages.py::test_register_language
-	tests/text_area/test_languages.py::test_register_language_existing_language
+	tests/text_area/test_languages.py
 )
 
+python_compile_all() {
+	echo "INHERIT: mkdocs-offline.yml" > "${S}/mkdocs.yml"
+	grep -v "\- \"*[Bb]log" "${S}/mkdocs-nav.yml" >> "${S}/mkdocs.yml"
+	docs_compile
+	rm "${S}/mkdocs.yml"
+}
+
 pkg_postinst() {
 	optfeature "bindings for python" dev-python/tree-sitter
 	optfeature "support for [language]" dev-libs/tree-sitter-[language]


             reply	other threads:[~2024-03-11  8:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  8:42 Henri Gasc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22  0:48 [gentoo-commits] repo/proj/guru:dev commit in: dev-python/textual/, dev-python/textual/files/ Henri Gasc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710146526.30eaec69dfe9008d12847e35418bba0233a91b63.gasc@gentoo \
    --to=gasc@eurecom.fr \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox