[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[WIP 6/8] guix: python-build-system: Delete .egg-info file created in ph
From: |
Hartmut Goebel |
Subject: |
[WIP 6/8] guix: python-build-system: Delete .egg-info file created in phase check. |
Date: |
Mon, 10 Oct 2016 16:57:17 +0200 |
* guix/build/python-build-system.scm (check): Delete .egg-info dirs
which did not exist prior to calling setup.py but afterwards.
---
guix/build/python-build-system.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/guix/build/python-build-system.scm
b/guix/build/python-build-system.scm
index 1950b3b..e85df40 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -67,7 +67,15 @@
(define* (check #:key tests? test-target use-setuptools? #:allow-other-keys)
"Run the test suite of a given Python package."
(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))
(define (get-python-version python)
--
2.7.4
- [WIP 0/9] python-build-system set 1: please review, Hartmut Goebel, 2016/10/10
- [WIP 3/8] guix: python-build-system: Import setuptools before calling `setup.py'., Hartmut Goebel, 2016/10/10
- [WIP 1/8] gnu: ensure pip and setuptools are installed even for Python 2., Hartmut Goebel, 2016/10/10
- [WIP 2/8] guix: build all Python packages with --single-version-externally-managed., Hartmut Goebel, 2016/10/10
- [WIP 5/8] guix: python-build-system: Add helpers for getting and setting PYTHONPATH., Hartmut Goebel, 2016/10/10
- [WIP 4/8] guix: python-build-system: Add option "#:use-setuptools?" (default true)., Hartmut Goebel, 2016/10/10
- [WIP 6/8] guix: python-build-system: Delete .egg-info file created in phase check.,
Hartmut Goebel <=
- [WIP 7/8] guix: Add lint-checker for packages which should be no inputs at all., Hartmut Goebel, 2016/10/10
- [WIP 8/8] lint: more packages to probably be a native input., Hartmut Goebel, 2016/10/10
- Re: [WIP 0/9] python-build-system set 1: please review, Hartmut Goebel, 2016/10/11
- Re: [WIP 0/9] python-build-system set 1: please review, Hartmut Goebel, 2016/10/11