I've installed this. 2006-02-16 Alexandre Duret-Lutz <[EMAIL PROTECTED]>
* doc/automake.texi (Python): More examples. Index: doc/automake.texi =================================================================== RCS file: /cvs/automake/automake/doc/automake.texi,v retrieving revision 1.127 diff -u -r1.127 automake.texi --- doc/automake.texi 5 Feb 2006 05:53:38 -0000 1.127 +++ doc/automake.texi 16 Feb 2006 21:02:11 -0000 @@ -5831,24 +5831,32 @@ @cindex Primary variable, @code{PYTHON} @vindex _PYTHON -Automake provides support for Python compilation with the @code{PYTHON} -primary. +Automake provides support for Python compilation with the [EMAIL PROTECTED] primary. A typical setup is to call [EMAIL PROTECTED] in @file{configure.ac} and use a line like the +following in @file{Makefile.am}: + [EMAIL PROTECTED] +python_PYTHON = tree.py leave.py [EMAIL PROTECTED] example Any files listed in a @code{_PYTHON} variable will be byte-compiled with @command{py-compile} at install time. @command{py-compile} -actually creates both standard (@file{.pyc}) and byte-compiled -(@file{.pyo}) versions of the source files. Note that because -byte-compilation occurs at install time, any files listed in +actually creates both standard (@file{.pyc}) and optimized +(@file{.pyo}) byte-compiled versions of the source files. Note that +because byte-compilation occurs at install time, any files listed in @code{noinst_PYTHON} will not be compiled. Python source files are -included in the distribution by default. +included in the distribution by default, prepend @code{nodist_} (as in [EMAIL PROTECTED]) to omit them. -Automake ships with an Autoconf macro called @code{AM_PATH_PYTHON} that -will determine some Python-related directory variables (see below). If -you have called @code{AM_PATH_PYTHON} from @file{configure.ac}, then you -may use the following variables to list you Python source files in your -variables: @code{python_PYTHON}, @code{pkgpython_PYTHON}, [EMAIL PROTECTED], @code{pkgpyexecdir_PYTHON}, depending where you -want your files installed. +Automake ships with an Autoconf macro called @code{AM_PATH_PYTHON} +that will determine some Python-related directory variables (see +below). If you have called @code{AM_PATH_PYTHON} from [EMAIL PROTECTED], then you may use the variables [EMAIL PROTECTED] or @code{pkgpython_PYTHON} to list Python source +files in your @file{Makefile.am}, depending where you want your files +installed (see the definitions of @code{pythondir} and [EMAIL PROTECTED] below). @defmac AM_PATH_PYTHON ([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) @@ -5860,10 +5868,17 @@ @var{ACTION-IF-FOUND} is run. Otherwise, @var{ACTION-IF-NOT-FOUND} is run. -If @var{ACTION-IF-NOT-FOUND} is not specified, the default is to abort -configure. This is fine when Python is an absolute requirement for the -package. Therefore if Python >= 2.2 is only @emph{optional} to the -package, @code{AM_PATH_PYTHON} could be called as follows. +If @var{ACTION-IF-NOT-FOUND} is not specified, as in the following +example, the default is to abort @command{configure}. + [EMAIL PROTECTED] +AM_PATH_PYTHON(2.2) [EMAIL PROTECTED] example + [EMAIL PROTECTED] +This is fine when Python is an absolute requirement for the package. +If Python >= 2.2 was only @emph{optional} to the package, [EMAIL PROTECTED] could be called as follows. @example AM_PATH_PYTHON(2.2,, :) @@ -5919,7 +5934,14 @@ @item pyexecdir This is the directory where Python extension modules (shared libraries) -should be installed. +should be installed. An extension module written in C could be declared +as follows to Automake: + [EMAIL PROTECTED] +pyexec_LTLIBRARIES = quaternion.la +quaternion_SOURCES = quaternion.c support.c support.h +quaternion_la_LDFLAGS = -avoid-version -module [EMAIL PROTECTED] example @item pkgpyexecdir This is a convenience variable that is defined as -- Alexandre Duret-Lutz