From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: guix-devel@gnu.org
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 [thread overview]
Message-ID: <1476111439-20812-7-git-send-email-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <1476111439-20812-1-git-send-email-h.goebel@crazy-compilers.com>
* 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
next prev parent reply other threads:[~2016-10-10 14:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 14:57 [WIP 0/9] python-build-system set 1: please review Hartmut Goebel
2016-10-10 14:57 ` [WIP 1/8] gnu: ensure pip and setuptools are installed even for Python 2 Hartmut Goebel
2016-10-10 14:57 ` [WIP 2/8] guix: build all Python packages with --single-version-externally-managed Hartmut Goebel
2016-10-10 14:57 ` [WIP 3/8] guix: python-build-system: Import setuptools before calling `setup.py' Hartmut Goebel
2016-10-10 14:57 ` [WIP 4/8] guix: python-build-system: Add option "#:use-setuptools?" (default true) Hartmut Goebel
2016-10-10 14:57 ` [WIP 5/8] guix: python-build-system: Add helpers for getting and setting PYTHONPATH Hartmut Goebel
2016-10-10 14:57 ` Hartmut Goebel [this message]
2016-10-10 14:57 ` [WIP 7/8] guix: Add lint-checker for packages which should be no inputs at all Hartmut Goebel
2016-10-10 14:57 ` [WIP 8/8] lint: more packages to probably be a native input Hartmut Goebel
2016-10-11 8:08 ` [WIP 0/9] python-build-system set 1: please review Hartmut Goebel
2016-10-11 8:37 ` Hartmut Goebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476111439-20812-7-git-send-email-h.goebel@crazy-compilers.com \
--to=h.goebel@crazy-compilers.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.