[bug#70858,v3,17/28] gnu: python-immutables: Remove python-mypy native-input.

Message ID 20250131021009.7499-18-ngraves@ngraves.fr
State New
Headers
Series python-team: Remove native-inputs |

Commit Message

Nicolas Graves Jan. 31, 2025, 2:03 a.m. UTC
  * gnu/packages/python-xyz.scm (python-immutables):
  [origin]: Use git-fetch to use upstream test-data directory.
  [native-inputs]: Remove python-mypy.
  [arguments]<#:phases>: Add phase to remove python-mypy native-input.
---
 gnu/packages/python-xyz.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 22b41ea4c1..6c1d41c39a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17019,13 +17019,22 @@  (define-public python-immutables
     (version "0.21")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "immutables" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/MagicStack/immutables")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32 "0jpw9nr2mbzqykigjhqa3a095bx7krwsnmjcxcpj944p8kqglpxm"))))
     (build-system pyproject-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'remove-mypy-dependency
+                          (lambda _
+                            (delete-file "tests/test_mypy.py")
+                            (delete-file "tests/conftest.py"))))))
     (native-inputs
-     (list python-mypy python-pytest python-setuptools python-wheel))
+     (list python-pytest python-setuptools python-wheel))
     (home-page "https://github.com/MagicStack/immutables")
     (synopsis "High-performance immutable mapping type for Python")
     (description