commit:     d5964f057cd2ca17e460cf05566df6dfd35157c9
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Wed Jan 22 00:45:07 2025 +0000
Commit:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
CommitDate: Wed Jan 22 00:48:26 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d5964f05

dev-python/textual: add 1.0.0

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

 dev-python/textual/Manifest                     |  1 +
 dev-python/textual/files/fix-mkdocstrings.patch | 26 --------
 dev-python/textual/textual-1.0.0.ebuild         | 85 +++++++++++++++++++++++++
 3 files changed, 86 insertions(+), 26 deletions(-)

diff --git a/dev-python/textual/Manifest b/dev-python/textual/Manifest
index 409b91620..1f9938833 100644
--- a/dev-python/textual/Manifest
+++ b/dev-python/textual/Manifest
@@ -1 +1,2 @@
 DIST textual-0.88.1.gh.tar.gz 29517235 BLAKE2B 
457caef7957eab0b7317e94ce4dd991cf0da54c4b7c9b670089de6cb762b1fd28c1021b8be89e66947717452dcc4925ff70eb856cef470eacda6062322df2e7a
 SHA512 
7c849dac56ca93853b36ad8c67f5544f5a071ad3b23f7753f46a6b62a1017098b40ce2be0aa526aa5a4de397ec26bb7b42a245170516e22ef297ccbc49321394
+DIST textual-1.0.0.gh.tar.gz 29642631 BLAKE2B 
e5122ed9f515c6c3f3707385523ec55d9281bda077fd80a9ca1b54030a0994800d6fe15b3f89998ac600b5e71120de0261d6b272132b5366d3bf53ec145dd1fa
 SHA512 
d943ba0a01f84b526a15755fd1fb41b094e6029f73b317e098b8c23abbc87e43b7f75d1ab9bc92c0462463ef5e9229476f5d2700fa27d1245665b9aa89c2a2b5

diff --git a/dev-python/textual/files/fix-mkdocstrings.patch 
b/dev-python/textual/files/fix-mkdocstrings.patch
deleted file mode 100644
index d1b13868f..000000000
--- a/dev-python/textual/files/fix-mkdocstrings.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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/dev-python/textual/textual-1.0.0.ebuild 
b/dev-python/textual/textual-1.0.0.ebuild
new file mode 100644
index 000000000..ede113543
--- /dev/null
+++ b/dev-python/textual/textual-1.0.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{10..13} )
+
+DOCS_BUILDER="mkdocs"
+DOCS_DEPEND="
+       dev-python/mkdocstrings
+       dev-python/mkdocstrings-python
+       dev-python/mkdocs-exclude
+       dev-python/mkdocs-git-revision-date-localized-plugin
+       dev-python/mkdocs-material
+       dev-python/mkdocs-rss-plugin
+"
+DOCS_INITIALIZE_GIT=1
+
+inherit distutils-r1 optfeature docs
+
+DESCRIPTION="Modern Text User Interface framework"
+HOMEPAGE="https://github.com/Textualize/textual 
https://pypi.org/project/textual/";
+SRC_URI="https://github.com/Textualize/textual/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       >=dev-python/markdown-it-py-2.1.0[${PYTHON_USEDEP}]
+       >=dev-python/platformdirs-3.6.0[${PYTHON_USEDEP}]
+       <dev-python/platformdirs-5[${PYTHON_USEDEP}]
+       >=dev-python/rich-13.3.3[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       test? (
+               dev-python/griffe[${PYTHON_USEDEP}]
+               dev-python/httpx[${PYTHON_USEDEP}]
+               dev-python/platformdirs[${PYTHON_USEDEP}]
+               dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+               =dev-python/textual-dev-1.7*[${PYTHON_USEDEP}]
+       )
+"
+DEPEND="${RDEPEND}"
+
+DOCS+=( CHANGELOG.md LICENSE README.md )
+
+EPYTEST_XDIST=1
+EPYTEST_DESELECT=(
+       # Those tests ask to press keys
+       tests/snapshot_tests/test_snapshots.py
+       
tests/test_xterm_parser.py::test_escape_sequence_resulting_in_multiple_keypresses
+
+       # Need a package that should be optional
+       tests/text_area/test_languages.py
+)
+distutils_enable_tests pytest
+python_test() {
+       if [[ ${EPYTHON} == python3.13 ]]; then
+               EPYTEST_DESELECT+=(
+                       # See https://github.com/Textualize/textual/issues/5327
+                       "tests/text_area"
+                       # Some tests just do not work under python3.13 (more 
than half of those in this file)
+                       tests/test_focus.py
+               )
+               epytest -m 'not syntax' tests
+       else
+               epytest tests
+       fi
+}
+
+python_compile_all() {
+       echo "INHERIT: mkdocs-offline.yml" > "${S}/mkdocs.yml"
+       grep -v "\- \"*[Bb]log" "${S}/mkdocs-nav.yml" >> "${S}/mkdocs.yml"
+       if use doc; then
+               DOCS+=( questions )
+       fi
+       docs_compile
+       rm "${S}/mkdocs.yml"
+}
+
+pkg_postinst() {
+       optfeature "bindings for python" dev-python/tree-sitter
+}

Reply via email to