From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: 'python-build-system' Date: Sun, 28 Apr 2013 22:52:40 +0200 Message-ID: <87ip36gyxz.fsf@gnu.org> References: <87sj34zvn1.fsf@karetnikov.org> <87ehdwkntv.fsf@gnu.org> <87sj2b8llf.fsf@karetnikov.org> <877gjmr2to.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWYaf-00023t-Oq for bug-guix@gnu.org; Sun, 28 Apr 2013 16:53:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWYaa-0000z5-8R for bug-guix@gnu.org; Sun, 28 Apr 2013 16:52:57 -0400 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=44560 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWYaZ-0000yC-To for bug-guix@gnu.org; Sun, 28 Apr 2013 16:52:52 -0400 In-Reply-To: <877gjmr2to.fsf@karetnikov.org> (Nikita Karetnikov's message of "Sun, 28 Apr 2013 21:18:43 +0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Nikita Karetnikov 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 fo= r 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=E2=80=99s 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=E2=80=99s =E2=80=98pk=E2=80=99 and =E2=80=98format=E2=80=99, to= add debugging statements here and there. There=E2=80=99s also the debugger. > From aa73cd5d8e5e48d24460c9d6bcebfc92b3311d4c Mon Sep 17 00:00:00 2001 > From: Nikita Karetnikov > 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=E2=80=99t like the =E2=80= =9Cassume it=E2=80=99s an absolute file name=E2=80=9D bit, because we don=E2=80=99t k= now 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 $PAT= H, for > programs that expect particular shared libraries to be in $LD_LIBRARY_PA= TH, 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))) >=20=20 > (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->se= xp > + (append search-paths > + (standard-search-path= s))) You also need to keep (package-native-search-paths python). See commit 35ac56b6, which fixed that for Perl & co. Otherwise looks good. Thanks! Ludo=E2=80=99.