unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: mbakke@fastmail.com
Cc: 36518@debbugs.gnu.org
Subject: bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64
Date: Sat, 06 Jul 2019 11:35:57 +0200	[thread overview]
Message-ID: <871rz3sdxe.fsf@elephly.net> (raw)
In-Reply-To: <87o928qc5p.fsf@devup.no>


Hi Marius,

> But the interpreter fails with 'unbound variable: this' upon running
> glibcs Python scripts.

This means it fell through to the case where “python” is called with
more than one argument:

--8<---------------cut here---------------start------------->8---
(define* (main #:optional (args (command-line)))
  (match args
    ((_ file)
     (let ((compiled (string-append file ".go")))
       (compile-file file
                     #:from python
                     #:output-file compiled)
       (load-compiled compiled)))
    ((_)
     (repl-default-option-set! 'prompt ">>> ")
     (set! (@@ (system repl common) repl-welcome)
           (const (display "\
Python on Guile, version 0.1.0
(Hit Ctrl-D to exit.)
")))
     (start-repl python)
     #t)
    (_ (format (current-error-port)
               "usage: ~a file.py~%" this))))
--8<---------------cut here---------------end--------------->8---

“this” was supposed to be the first match, i.e. the “python” executable
itself.  Anyway, the problem is that “python” doesn’t handle any flags
at all.  I’ll implement option “handling” soon (maybe we can ignore most
options to “python”).

--
Ricardo

  reply	other threads:[~2019-07-06  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 23:44 bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64 Marius Bakke
2019-07-06  9:35 ` Ricardo Wurmus [this message]
2019-07-07 14:42   ` Marius Bakke

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=871rz3sdxe.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=36518@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /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).