From ac1fb33ffd75ea80d063a53b74b2d9d0c0959109 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 19 Oct 2025 21:03:00 +0100 Subject: [PATCH] gnu: python-fs: Fix build on cross compilation. * gnu/packages/python-xyz.scm (python-fs)[arguments] : Move option here instead of overwriting 'check phase. : Use default 'check; add 'pre-check. [native-inputs]: Keep python-setuptools away from condition. Fixes: guix/guix#3656 Change-Id: I247a70ea9d3fbc94a748973dd4a273341408fea9 --- gnu/packages/python-xyz.scm | 50 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 9a8032049f5230809b95926b77c4cc0cbadaf2ee..b2be63df07575e152d42cf509134ec74e13de59f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17199,33 +17199,41 @@ It has a flexible system of @samp{authorizers} able to manage both (source (origin (method git-fetch) - (uri (git-reference (url - "https://github.com/PyFilesystem/pyfilesystem2/") - (commit (string-append "v" version)))) + (uri (git-reference + (url "https://github.com/PyFilesystem/pyfilesystem2/") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) - (sha256 (base32 "1wrkhsv57kv4jcadn7w330mgbjjsimgzfvicni8cka6y1a8chbjs")))) + (sha256 + (base32 "1wrkhsv57kv4jcadn7w330mgbjjsimgzfvicni8cka6y1a8chbjs")))) (build-system pyproject-build-system) (arguments (list + ;; tests: 1995 passed, 21 skipped, 411 deselected, 14 warnings + #:test-flags #~(list "-m" "not slow") #:tests? (and (not (%current-target-system)) (->bool (this-package-native-input "python-pytest"))) - #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - (invoke "pytest" "-m" "not slow"))))))) - (propagated-inputs - (list python-appdirs python-pytz python-six)) - (native-inputs - ;; 'python-pyftpdlib' is needed for tests but it indirectly depends Rust, - ;; which is currently unavailable on aarch64-linux. Remove all the test - ;; dependencies in that case. - (if (and (not (%current-target-system)) - (supported-package? python-pyftpdlib)) - (list python-mock python-parameterized python-pyftpdlib - python-pytest python-setuptools) - '())) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs + (append + (list python-setuptools) + ;; 'python-pyftpdlib' is needed for tests but it indirectly depends Rust, + ;; which is currently unavailable on aarch64-linux. Remove all the test + ;; dependencies in that case. + (if (and (not (%current-target-system)) + (supported-package? python-pyftpdlib)) + (list python-mock + python-parameterized + python-pyftpdlib + python-pytest) + '()))) + (propagated-inputs + (list python-appdirs + python-pytz + python-six)) ;still hard itegrated (home-page "https://github.com/PyFilesystem/pyfilesystem2/") (synopsis "File system abstraction layer for Python") (description