troubles building the last rev 21171 on Wn7

Gilles Duboscq gilwooden at gmail.com
Tue May 5 07:59:14 UTC 2015


Hello Raffaello,

Thank you for testing this. The latest tip should not have this problem any
more.

Gilles

On Sun, 3 May 2015 14:55 Raffaello Giulietti <raffaello.giulietti at supsi.ch>
wrote:

> Hi Gilles,
>
> following your suggestion, after uncommenting the import of readline and
> its usage a couple of lines later, the build succeeds.
>
> The following patch might help other people on Windows. It assumes that
> on the other systems the import always succeeds.
>
>
> @@ -48,10 +48,13 @@
>  from os.path import join, basename, dirname, exists, getmtime, isabs,
> expandvars, isdir, isfile
>
>  # needed to work around https://bugs.python.org/issue1927
> -import <https://bugs.python.org/issue1927-import> readline
> +try:
> +  import readline
>  #then make pylint happy..
> -readline.get_line_buffer()
> -
> +  readline.get_line_buffer()
> +except ImportError:
> +  print("import readline failed, OK on Windwos")
> +
>  # Support for Python 2.6
>  def check_output(*popenargs, **kwargs):
>      process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs,
> **kwargs)
>
>
>
>
> And of course, you're right about the rev. number: I should have
> indicated the changeset id. The given rev. number was meant to be the
> one in *the* official repository.
>
> Thanks for your time
> Raffaello
>
>
>
> On 2015-05-02 22:14, Gilles Duboscq wrote:
> > Hello,
> >
> > I looked at the documentation to see if there was any indication that
> > readline would not be available on Windows and couldn't find any. Now I
> > know.
> > You an comment this line out, it shouldn't be necessary on Windows.
> > I'll make this best effort and silently swallow the ImportError.
> >
> > Gilles
> >
> > PS: hg revision numbers are local-only [1], my "21171" is probably
> > different than yours. A reasonably sized prefix of the changeset id is
> > usually a better way of identifying changesets.
> >
> > [1] http://mercurial.selenic.com/wiki/RevisionNumber
> >
> > On Sat, May 2, 2015 at 2:22 PM Raffaello Giulietti
> > <raffaello.giulietti at supsi.ch <mailto:raffaello.giulietti at supsi.ch>>
> wrote:
> >
> >     After pulling rev. 21171 and updating, here's what happens on Win7:
> >
> >
> >     C:\dev\graal>mx build
> >
> >     C:\dev\graal>python C:\dev\graal\/mxtool/mx.py build
> >     Traceback (most recent call last):
> >       File "C:\dev\graal\/mxtool/mx.py", line 51, in <module>
> >         import readline
> >     ImportError: No module named readline
> >
> >
> >     Anybody observing a similar behavior, even perhaps on Linux?
> >
> >     Greetings
> >     Raffaello
> >
>
>


More information about the graal-dev mailing list