Subject: bug#25177: Test failures don't cause some Python packages to fail [was Re: [PATCH 05/11] gnu: Add python-pygit2.]

From: Marius Bakke <[email-masked]>
Date: Mon, 12 Dec 2016 00:05:57 +0100

Marius Bakke <[email-masked]> writes:

> Perhaps something like this would work (untested)?

Oops, here is the patch I wanted to attach:

--8<---------------cut here---------------start------------->8---
(define* (check #:key tests? test-target use-setuptools? #:allow-other-keys)
  "Run the test suite of a given Python package."
  (if tests?
      (let ((before (find-files "build" "\\.egg-info$" #:directories? #t)))
        (if (call-setuppy test-target '() use-setuptools?)
            (let* ((after (find-files "build" "\\.egg-info$" #:directories? #t))
                   (inter (lset-difference eqv? after before)))
              (for-each delete-file-recursively inter)
              #t))
        #f)
      #t))
--8<---------------cut here---------------end--------------->8---