automake-patches
[Top][All Lists]
Advanced

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

python-pyoc-doc.patch


From: Alexandre Duret-Lutz
Subject: python-pyoc-doc.patch
Date: 21 Oct 2001 17:32:26 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:

[...]

 adl> I'll submit a patch later today to remove the PYCFILES/PYOFILES
 adl> documentation, because presently it's just confusing.

[...]

2001-10-21  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (handle_python): Use require_conf_file to require
        py-compile, because py-compile is independant of AM_PROG_PYTHON.
        * lib/am/python.am: Cleanup the cleaning section.
        * automake.texi (Python): Remove documentation for PYCFILES
        and PYOFILES.  Update the first paragraphes.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1189
diff -u -r1.1189 automake.in
--- automake.in 2001/10/20 19:13:49     1.1189
+++ automake.in 2001/10/21 15:30:46
@@ -4328,11 +4328,11 @@
     return if ! @pyfiles;
 
     # Found some python.
+
     &am_error ("`python_PYTHON' defined but `AM_PATH_PYTHON' not in 
`$configure_ac'")
        if ! $seen_pythondir && &variable_defined ('python_PYTHON');
 
-    &require_conf_file_with_conf_line ('AM_PATH_PYTHON',
-                                      $FOREIGN, 'py-compile');
+    &require_conf_file ($FOREIGN, 'py-compile');
     &define_variable ('py_compile', $config_aux_dir . '/py-compile');
 }
 
Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.243
diff -u -r1.243 automake.texi
--- automake.texi       2001/10/20 11:14:36     1.243
+++ automake.texi       2001/10/21 15:31:03
@@ -3153,14 +3153,25 @@
 @cindex Primary variable, PYTHON
 
 
-Automake provides support for Python modules.  Automake will turn on
-Python support if the @code{AM_PATH_PYTHON} macro is used in
address@hidden  The @samp{PYTHON} primary is used to hold a list
-of @file{.py} files.  Possible prefixes for this primary are
address@hidden and @samp{noinst_}.  Note that if @code{python_PYTHON} is
-defined, then @file{configure.in} must run @code{AM_PATH_PYTHON}.
+Automake provides support for Python compilation with the @samp{PYTHON}
+primary.
+
+Any files listed in a @samp{_PYTHON} variable will be byte-compiled with
address@hidden at install time.  @code{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 @samp{noinst_PYTHON} will not be compiled.
 Python source files are included in the distribution by default.
 
+Automake ships with an Autoconf macro called @code{AM_PATH_PYTHON} which
+will determine some Python-related directory variables (see below).  If
+have called @code{AM_PATH_PYTHON} from you @file{configure.in}, then you
+may use the following variables to list you Python source files in your
+variables: @samp{python_PYTHON}, @samp{pkgpython_PYTHON},
address@hidden, @samp{pyexecdir_PYTHON},
address@hidden, depending where you want your files
+installed.
+
 @code{AM_PATH_PYTHON} takes a single optional argument.  This argument,
 if present, is the minimum version of Python which can be used for this
 package.  If the version of Python found on the system is older than the
@@ -3210,15 +3221,6 @@
 This is a convenience variable which is defined as
 @samp{$(pyexecdir)/$(PACKAGE)}.
 @end vtable
-
address@hidden PYCFILES
address@hidden PYOFILES
-
-By default Automake will byte-compile all Python source files to both
address@hidden and @file{.pyo} forms.  If you wish to avoid generating the
-optimized byte-code files, simply define the variable @code{PYOFILES} to
-be empty.  Similarly, if you don't wish to generate the standard
-byte-compiled files, define the variable @code{PYCFILES} to be empty.
 
 
 @node Documentation, Install, Other GNU Tools, Top
Index: lib/am/python.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/python.am,v
retrieving revision 1.11
diff -u -r1.11 python.am
--- python.am   2001/10/02 15:33:59     1.11
+++ python.am   2001/10/21 15:31:03
@@ -68,20 +68,8 @@
 ## Cleaning.  ##
 ## ---------- ##
 
-## FIXME: There is nothing to clean here since files are
-##        byte-compiled when (and where) they are installed.
-##        Some points thought:
-##          1) clean-python ought to be named clean-%DIR%PYTHON, to allow
-##             multiple _PYTHON targets.
-##          2) PYCFILES and PYOFILES are documented but not used anywhere
-##             else.
-##          3) PYCFILES and PYOFILES shoud be target-dependent for the same
-##             reason.
-##
-##.PHONY clean-am: clean-python
-##clean-python:
-##     -test -z "$(PYCFILES)$(PYOFILES)" || rm -f $(PYCFILES) $(PYOFILES)
-
+## There is nothing to clean here since files are
+## byte-compiled when (and where) they are installed.
 
 ## -------------- ##
 ## Distributing.  ##
-- 
Alexandre Duret-Lutz



reply via email to

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