From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: bug-guix@gnu.org
Subject: Re: 'python-build-system'
Date: Sun, 28 Apr 2013 22:52:40 +0200 [thread overview]
Message-ID: <87ip36gyxz.fsf@gnu.org> (raw)
In-Reply-To: <877gjmr2to.fsf@karetnikov.org> (Nikita Karetnikov's message of "Sun, 28 Apr 2013 21:18:43 +0400")
Nikita Karetnikov <nikita@karetnikov.org> skribis:
> 'bazaar.scm' is for testing. The following warnings appear during the
> installation:
>
> GNU gettext msgfmt utility not found!
Just add gettext as an input.
> patch-shebang: ./tools/packaging/lp-upload-release: warning: no binary for interpreter `zsh' found in $PATH
>
> patch-shebang: ./tools/weavemerge.sh: warning: no binary for interpreter `zsh' found in $PATH
>
> Can we replace 'zsh' with 'bash'? I guess there may be some
> compatibility problems.
Yes, definitely. But that’s not a problem: these scripts are most
likely unused during the build process and afterward.
> Also, I should mention that I don't understand some parts of the build
> system. I'm not sure how to check them. Is there a Scheme level
> 'strace'-like tool? If not, I'll send more specific questions later.
Well, there’s ‘pk’ and ‘format’, to add debugging statements here and
there. There’s also the debugger.
> From aa73cd5d8e5e48d24460c9d6bcebfc92b3311d4c Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Sun, 28 Apr 2013 16:08:23 +0000
> Subject: [PATCH] utils: Adjust 'wrap-program'.
>
> * guix/build/utils.scm (wrap-program): Assume that 'prog' is an
> absolute filename. Adjust 'prog-real' and 'prog-tmp' accordingly.
> Also, change 'prog-tmp' to honor command line arguments.
What was wrong with the previous approach? I don’t like the “assume
it’s an absolute file name” bit, because we don’t know whether the
assumption holds.
> guix/build/utils.scm | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/guix/build/utils.scm b/guix/build/utils.scm
> index 356dd46..fe6978b 100644
> --- a/guix/build/utils.scm
> +++ b/guix/build/utils.scm
> @@ -680,8 +680,8 @@ contents:
> This is useful for scripts that expect particular programs to be in $PATH, for
> programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
> modules in $GUILE_LOAD_PATH, etc."
> - (let ((prog-real (string-append "." prog "-real"))
> - (prog-tmp (string-append "." prog "-tmp")))
> + (let ((prog-real (string-append (dirname prog) "/." (basename prog) "-real"))
> + (prog-tmp (string-append (dirname prog) "/." (basename prog) "-tmp")))
> (define (export-variable lst)
> ;; Return a string that exports an environment variable.
> (match lst
> @@ -709,11 +709,11 @@ modules in $GUILE_LOAD_PATH, etc."
> (with-output-to-file prog-tmp
> (lambda ()
> (format #t
> - "#!~a~%~a~%exec ~a~%"
> + "#!~a~%~a~%exec ~a $@~%"
Oops, indeed. You need double quotes around $@.
> (which "bash")
> (string-join (map export-variable vars)
> "\n")
> - (canonicalize-path prog-real))))
> + prog-real)))
>
> (chmod prog-tmp #o755)
> (rename-file prog-tmp prog)))
> + (define builder
> + `(begin
> + (use-modules ,@modules)
> + (python-build #:name ,name
> + #:source ,(if (and source (derivation-path? source))
> + (derivation-path->output-path source)
> + source)
> + #:configure-flags ,configure-flags
> + #:system ,system
> + #:test-target "test"
> + #:tests? ,tests?
> + #:outputs %outputs
> + #:python-version ,python-version
> + #:search-paths ',(map search-path-specification->sexp
> + (append search-paths
> + (standard-search-paths)))
You also need to keep (package-native-search-paths python). See commit
35ac56b6, which fixed that for Perl & co.
Otherwise looks good.
Thanks!
Ludo’.
next prev parent reply other threads:[~2013-04-28 20:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 18:21 'python-build-system' Nikita Karetnikov
2013-04-07 10:34 ` 'python-build-system' Ludovic Courtès
2013-04-23 9:49 ` ERROR: missing interface for module (gnutls) (was: 'python-build-system') Nikita Karetnikov
2013-04-23 11:51 ` ERROR: missing interface for module (gnutls) Ludovic Courtès
2013-04-23 15:03 ` Nikita Karetnikov
2013-04-23 16:01 ` Ludovic Courtès
2013-04-27 15:14 ` 'python-build-system' Ludovic Courtès
2013-04-28 1:55 ` 'python-build-system' Nikita Karetnikov
2013-04-28 17:18 ` 'python-build-system' Nikita Karetnikov
2013-04-28 20:52 ` Ludovic Courtès [this message]
2013-04-29 3:50 ` 'python-build-system' Nikita Karetnikov
2013-04-29 11:42 ` 'python-build-system' Ludovic Courtès
2013-05-08 1:52 ` 'python-build-system' Nikita Karetnikov
2013-05-08 16:47 ` 'python-build-system' Ludovic Courtès
2013-05-08 23:22 ` 'python-build-system' Nikita Karetnikov
2013-05-09 20:29 ` 'python-build-system' Ludovic Courtès
2013-04-29 19:33 ` 'python-build-system' Ludovic Courtès
2013-04-30 15:04 ` 'python-build-system' Ludovic Courtès
2013-04-28 22:50 ` 'python-build-system' Cyril Roelandt
2013-04-29 11:50 ` 'python-build-system' Ludovic Courtès
2013-04-29 19:24 ` 'python-build-system' Cyril Roelandt
2013-04-30 13:47 ` 'python-build-system' Nikita Karetnikov
2013-05-06 21:07 ` 'python-build-system' Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ip36gyxz.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=bug-guix@gnu.org \
--cc=nikita@karetnikov.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).