guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

14/103: gnu: python-testpath: Remove custom build phases.


From: guix-commits
Subject: 14/103: gnu: python-testpath: Remove custom build phases.
Date: Wed, 5 Jan 2022 09:44:28 -0500 (EST)

lbraun pushed a commit to branch wip-python-pep517
in repository guix.

commit 9ffecd53279f7f991f844f7fcaa0eaf63b26115d
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Thu Nov 25 13:24:31 2021 +0100

    gnu: python-testpath: Remove custom build phases.
    
    python-build-system supports PEP 517 now.
    
    * gnu/packages/check.scm (python-testpath)[#:phases]: Remove.
    [arguments]: Add #:build-backend.
    [native-inputs]: Add pytest.
---
 gnu/packages/check.scm | 28 +++-------------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 0a90a3b167..241cec110b 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1865,32 +1865,10 @@ C/C++, R, and more, and uploads it to the 
@code{codecov.io} service.")
         (base32
          "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk"))))
     (build-system python-build-system)
-    (arguments
-     `(#:tests? #f ; this package does not even have a setup.py
-       #:modules ((guix build python-build-system)
-                  (guix build utils)
-                  (srfi srfi-1))
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'build
-           (lambda _
-             ;; A ZIP archive should be generated, but it fails with "ZIP does
-             ;; not support timestamps before 1980".  Luckily,
-             ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
-             ;; 1980.
-             (setenv "SOURCE_DATE_EPOCH" "315532800")
-             (invoke "flit" "build")))
-         (replace 'install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (let ((out (assoc-ref outputs "out")))
-               (for-each (lambda (wheel)
-                           (format #true wheel)
-                           (invoke "python" "-m" "pip" "install"
-                                   wheel (string-append "--prefix=" out)))
-                         (find-files "dist" "\\.whl$"))))))))
+    ;; pyproject.toml uses wrong package.
+    (arguments `(#:build-backend "flit_core.buildapi"))
     (native-inputs
-     (list python-flit))
+     (list python-flit-core python-pytest))
     (home-page "https://github.com/takluyver/testpath";)
     (synopsis "Test utilities for code working with files and commands")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]