[bug#77093,rust-team,v3,06/17] build/cargo: Don't try to unpack sanity-check.py.

Message ID 66d29a621b80ab17ec6125e9877e365dce174ce0.1742713356.git.hako@ultrarare.space
State New
Headers
Series [bug#77093,rust-team,v3,01/17] build/cargo: Pass ‘--offline’ to cargo. |

Commit Message

Hilton Chain March 23, 2025, 7:28 a.m. UTC
  From: Efraim Flashner <efraim@flashner.co.il>

* guix/build/cargo-build-system.scm (crate-src?): Also don't try to
check python scripts for Cargo.toml.

Change-Id: I001a89b83d2e472706b1263007be45d1153c140f
---
 guix/build/cargo-build-system.scm | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 15eda8396c..f2a7323748 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -64,6 +64,7 @@  (define (crate-src? path)
   "Check if PATH refers to a crate source, namely a gzipped tarball with a
 Cargo.toml file present at its root."
     (and (not (directory-exists? path)) ; not a tarball
+         (not (string-suffix? "py" path))   ; sanity-check.py
          ;; First we print out all file names within the tarball to see if it
          ;; looks like the source of a crate. However, the tarball will include
          ;; an extra path component which we would like to ignore (since we're