[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#7944: Should AM_PATH_PYTHON call AC_ARG_VAR?
From: |
Ralf Wildenhues |
Subject: |
Re: bug#7944: Should AM_PATH_PYTHON call AC_ARG_VAR? |
Date: |
Tue, 15 Feb 2011 07:21:31 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
* Stefano Lattarini wrote on Tue, Feb 15, 2011 at 12:37:58AM CET:
> On Monday 14 February 2011, Ralf Wildenhues wrote:
> > * Stefano Lattarini wrote on Mon, Feb 14, 2011 at 12:35:17PM CET:
> > > On Friday 11 February 2011, Ralf Wildenhues wrote:
> > > >
> > > > There are a couple of things that I think could be better. One sentence
> > > > as a paragraph on its own isn't too pretty. The PYTHON override doesn't
> > > > seem to be the most important thing to me, so I'd put it last not first.
> > > > This would be in line with how autoconf.texi documents many macros:
> > > > cache and override variables are listed late. Also, I'd document that
> > > > the PYTHON variable is set by the macro. Ahh, that is already done,
> > > > further down in the text. I think the mention of override could be
> > > > placed there as well.
> > > >
> > > > So, how about this instead? Feel free to squash in and push if you
> > > > agree.
> > > >
> > > Hmmm... is the diff you posted incomplete, or am I missing something?
> > > I'll refrain from pushing the patch until this issue is clarified.
> >
> > I think the diff was complete in the sense that all my intended changes
> > were shown,
> >
> Oh. I thought it was incomplete in the sense that it didn't address some
> of the issues you had brought up (``The PYTHON override doesn't seem to
> be the most important thing to me, so I'd put it last not first'', ``One
> sentence as a paragraph on its own isn't too pretty'', etc,). I think
> we are experiencing a communication problem here; i.e., I can't understand
> whether I'm supposed to address those issues myself, or whether you think
> that they are secondary, your squash-in diff is enough, and I should push
> after having just applied it. Could you please clarify? Thanks.
Sorry, I'm probably just making myself not clear. Here's a patch that I
would squash in on top of your patch, and that I think addresses all
issues that I mention in my review. It basically reverses the doc part
of your patch and then applies the diff I posted earlier.
Thanks for your patience,
Ralf
diff --git a/doc/automake.texi b/doc/automake.texi
index fd9d33e..091d7a2 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7632,24 +7632,19 @@ Python
installed (see the definitions of @code{pythondir} and
@code{pkgpythondir} below).
address@hidden AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found},
@ovar{action-if-not-found})
address@hidden AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found}, @
+ @ovar{action-if-not-found})
-Search for a Python interpreter on the system. The user can force the
-choice with the configuration variable @env{PYTHON}.
+Search for a Python interpreter on the system. This macro takes three
+optional arguments. The first argument, if present, is the minimum
+version of Python required for this package: @code{AM_PATH_PYTHON}
+will skip any Python interpreter that is older than @var{version}.
+If an interpreter is found and satisfies @var{version}, then
address@hidden is run. Otherwise, @var{action-if-not-found} is
+run.
-This macro takes three optional arguments.
-
-The first argument, if present, is the minimum version of Python required
-for this package; @code{AM_PATH_PYTHON} will skip any Python interpreter
-that is older than @var{version}. Note that, if @env{PYTHON} was specified
-by the user, the version check will still take place, but no other Python
-interpreter will be tried if that fails.
-
-If an interpreter is found and satisfies @var{version} (which, in case
address@hidden is empty or unspecified, means @emph{any} interpreter), then
address@hidden is run. Otherwise, @var{action-if-not-found} is run.
-If @var{action-if-not-found} is not specified, as in the following example
-, the default is to abort @command{configure}.
+If @var{action-if-not-found} is not specified, as in the following
+example, the default is to abort @command{configure}.
@example
AM_PATH_PYTHON([2.2])
@@ -7664,6 +7659,9 @@ Python
AM_PATH_PYTHON([2.5],, [:])
@end example
+If the @env{PYTHON} variable is set when @code{AM_PATH_PYTHON} is
+called, then that will be the only Python interpreter that is tried.
+
@code{AM_PATH_PYTHON} creates the following output variables based on
the Python installation found during configuration.
@end defmac
@@ -7679,8 +7677,8 @@ Python
as follows.
@example
- AM_PATH_PYTHON(,, [:])
- AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
+AM_PATH_PYTHON(,, [:])
+AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
@end example
@item PYTHON_VERSION