mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 13:09:23 -05:00
guix: python-build-system: Delete .egg-info file created in phase check.
* guix/build/python-build-system.scm (check): Delete .egg-info dirs which did not exist prior to calling setup.py but afterwards.
This commit is contained in:
parent
a2ff4f0240
commit
b002f964bb
1 changed files with 9 additions and 1 deletions
|
@ -69,7 +69,15 @@ (define* (build #:key use-setuptools? #:allow-other-keys)
|
||||||
(define* (check #:key tests? test-target use-setuptools? #:allow-other-keys)
|
(define* (check #:key tests? test-target use-setuptools? #:allow-other-keys)
|
||||||
"Run the test suite of a given Python package."
|
"Run the test suite of a given Python package."
|
||||||
(if tests?
|
(if tests?
|
||||||
(call-setuppy test-target '() use-setuptools?)
|
;; Running `setup.py test` creates an additional .egg-info directory in
|
||||||
|
;; build/lib in some cases, e.g. if the source is in a sub-directory
|
||||||
|
;; (given with `package_dir`). This will by copied to the output, too,
|
||||||
|
;; so we need to remove.
|
||||||
|
(let ((before (find-files "build" "\\.egg-info$" #:directories? #t)))
|
||||||
|
(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))
|
#t))
|
||||||
|
|
||||||
(define (get-python-version python)
|
(define (get-python-version python)
|
||||||
|
|
Loading…
Reference in a new issue