guix-commits
[Top][All Lists]
Advanced

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

106/379: gnu: python-cryptography-rust: Enable tests.


From: guix-commits
Subject: 106/379: gnu: python-cryptography-rust: Enable tests.
Date: Thu, 29 Jun 2023 12:32:58 -0400 (EDT)

efraim pushed a commit to branch rust-team
in repository guix.

commit 3a08b776c0c4b14b3ac8f2a371ebe6708d0f8ec7
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu May 11 18:21:26 2023 +0300

    gnu: python-cryptography-rust: Enable tests.
    
    * gnu/packages/python-crypto.scm (python-cryptography-rust)
    [arguments]: Don't skip the tests. Add a custom 'check phase.
---
 gnu/packages/python-crypto.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index bcef7c5db6..cfd1146f06 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -557,11 +557,6 @@ ciphers, message digests and key derivation functions.")
                   (guix build utils)
                   (srfi srfi-1)
                   (ice-9 match))
-      ;; XXX: Building the test objects appear to fail due to a missing link
-      ;; directive to Python's shared library (e.g.: "ld:
-      ;; cryptography_rust.c950d742-cgu.11:(.text._ZN3...+0x57): undefined
-      ;; reference to `PyLong_FromLong'").
-      #:tests? #f
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'chdir
@@ -579,6 +574,11 @@ ciphers, message digests and key derivation functions.")
               (apply (assoc-ref %standard-phases 'configure)
                      (append args
                              (list #:inputs (alist-delete "source" inputs))))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; As seen in tox.ini
+                (invoke "cargo" "test" "--no-default-features"))))
           (add-after 'install 'install-shared-library
             (lambda _
               (install-file "target/release/libcryptography_rust.so"



reply via email to

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