automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: more doc about _PYTHON


From: Alexandre Duret-Lutz
Subject: FYI: more doc about _PYTHON
Date: Thu, 16 Feb 2006 22:03:07 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

I've installed this.

2006-02-16  Alexandre Duret-Lutz  <address@hidden>

        * 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
address@hidden primary.  A typical setup is to call
address@hidden in @file{configure.ac} and use a line like the
+following in @file{Makefile.am}:
+
address@hidden
+python_PYTHON = tree.py leave.py
address@hidden 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
address@hidden) 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},
address@hidden, @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
address@hidden, then you may use the variables
address@hidden 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
address@hidden below).
 
 @defmac AM_PATH_PYTHON (address@hidden, address@hidden, address@hidden)
 
@@ -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}.
+
address@hidden
+AM_PATH_PYTHON(2.2)
address@hidden example
+
address@hidden
+This is fine when Python is an absolute requirement for the package.
+If Python >= 2.2 was only @emph{optional} to the package,
address@hidden 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:
+
address@hidden
+pyexec_LTLIBRARIES = quaternion.la
+quaternion_SOURCES = quaternion.c support.c support.h
+quaternion_la_LDFLAGS = -avoid-version -module
address@hidden example
 
 @item pkgpyexecdir
 This is a convenience variable that is defined as
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]