diff mbox series

[bug#68207,v4,5/8] gnu: python-textual: Update to 0.50.1.

Message ID c277a22f7e5556443a29bf5bd05bfb01ba8c591b.1707833700.git.sharlatanus@gmail.com
State New
Headers show
Series [bug#68207,v4,1/8] gnu: python-markdown-it-py: Update to 3.0.0. | expand

Commit Message

Sharlatan Hellseher Feb. 13, 2024, 2:15 p.m. UTC
From: Felix Gruber <felgru@posteo.net>

* gnu/packages/python-xyz.scm (python-textual): Update to 0.50.1.
[source]: Download from github as pypi package does not include tests.
[build-system]: Change to pyproject-build-system.
[arguments]: Remove custom 'check phase; add #:test-flags to disable
broken tests.
[propagated-inputs]: Add python-markdown-it-py, python-mdit-py-plugins
and python-tree-sitter.
[native-inputs]: Add python-poetry-core and python-pytest-asyncio.

Change-Id: Ib144dc87f73e91d4c9d2e8f91ce6ce7a86a481a9
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
---
 gnu/packages/python-xyz.scm | 49 ++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 25 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index afd5caf541..27665e1cad 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,7 +108,7 @@ 
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;; Copyright © 2021, 2022, 2023 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;; Copyright © 2021, 2022 Pradana Aumars <paumars@courrier.dev>
-;;; Copyright © 2021, 2022, 2023 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2021–2024 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
 ;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@protonmail.com>
@@ -266,6 +266,7 @@  (define-module (gnu packages python-xyz)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages tree-sitter)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -19242,20 +19243,8 @@  (define-public python-rich-click
 (define-public python-textual
   (package
     (name "python-textual")
-    (version "0.1.18")
+    (version "0.50.1")
     (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "textual" version))
-              (sha256
-               (base32
-                "08yg5a51hz1axfj5hx28hx31gq5apcj6vpkkmawmiplisa73z25j"))))
-    (build-system python-build-system)
-    (arguments
-     (let ((tests
-            ;; The release on pypi comes without tests.  We can't build
-            ;; from this checkout, though, because installation requires
-            ;; an invocation of poetry.
-            (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/Textualize/textual")
@@ -19263,19 +19252,29 @@  (define-public python-textual
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0b3ycwqhp21mg9fvmadgxhgbvkwq6fd784l2xcmvy77rravrnnax")))))
-       (list #:phases
-             #~(modify-phases %standard-phases
-                 (replace 'check
-                   (lambda* (#:key tests? #:allow-other-keys)
-                     (when tests?
-                       (copy-recursively #$(file-append tests "/tests")
-                                         "tests")
-                       (invoke "python" "-m" "pytest" "-vv"))))))))
+                "10mmmgsq5pblr9ijgyln79p3hc7sah56k2hkzlvm2abrr9gwgpcf"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:test-flags
+           ;; Snapshot tests require python-pytest-textual-snapshot which
+           ;; in turn depends on python-textual.
+           '(list "--ignore=tests/snapshot_tests/test_snapshots.py"
+             "-k" (string-append
+                   ;; Broken for unknown reason.
+                   "not test_textual_env_var"
+                   ;; Tests that require python-treesitter-languages.
+                   " and not test_language_binary_missing"
+                   " and not test_register_language"
+                   " and not test_register_language_existing_language"))))
     (propagated-inputs
-     (list python-rich python-typing-extensions))
+     (list python-markdown-it-py
+           python-mdit-py-plugins
+           python-rich
+           python-tree-sitter
+           ;; python-tree-sitter-languages ; optional, not packed yet
+           python-typing-extensions))
     (native-inputs
-     (list python-pytest))
+     (list python-poetry-core python-pytest python-pytest-asyncio))
     (home-page "https://github.com/Textualize/textual")
     (synopsis "Build text user interfaces in Python")
     (description "Textual is a @acronym{TUI, Text User Interface} framework