well as a Perl, sleep utility, and filesystem that supports
sub-second resolution; otherwise, we fall back to one-second
granularity as before. When everything is supported, a line
- `Features: subsecond-mtime' is now printed by automake --version
+ "Features: subsecond-mtime" is now printed by automake --version
and autom4te --version. (bug#64756, bug#67670)
- The default value of $ARFLAGS is now "cr" instead of "cru", to better
only for compression, not decompression, because of the same system.
(bug#68151)
- - Dependency files are now empty, instead of '# dummy', for speed.
+ - Dependency files are now empty, instead of "# dummy", for speed.
(https://lists.gnu.org/archive/html/automake/2022-05/msg00006.html)
- Compiling Python modules with Python 3.5+ uses multiple optimization
levels. (bug#38043)
+ - The installation directory for Python files again defaults to
+ "site-packages" under the usual installation prefix, even on systems
+ (generally Debian-based) that would normally use the "dist-packages"
+ subdirectory under /usr/local. (bug#54412, bug#64837)
+
- When compiling Emacs Lisp files, emacs is run with --no-site-file to
disable user config files that might hang or access the terminal;
and -Q is not used, since its support and behavior varies. (bug#58102)
@item pythondir
@cindex @file{site-packages} Python directory
-The directory name for the @file{site-packages} subdirectory of the
-standard Python install tree.
+@cindex @file{dist-packages} Python directory
+The subdirectory of the Python install tree in which to install Python
+scripts. By default this is, on all systems,
+@file{$PYTHON_PREFIX/lib/python@var{version}/site-packages}, where
+@code{$PYTHON_PREFIX} is described above, and @var{version} is the
+Python version. (For those knowledgeable about Python installation
+details: systems generally have their own Python installation scheme,
+such as @code{posix_local} on Debian and related (as of
+Python@tie{}3.10), which ends up using a directory named
+@file{dist-packages}; Automake uses the @code{posix_prefix} scheme and
+@file{site-packages}.)
+@c https://bugs.gnu.org/54412 et al.
@item pkgpythondir
This is the directory under @code{pythondir} that is named after the
dnl 1. pythondir: where to install python scripts. This is the
dnl site-packages directory, not the python standard library
- dnl directory like in previous automake betas. This behavior
+ dnl directory as in early automake betas. This behavior
dnl is more consistent with lispdir.m4 for example.
- dnl Query distutils for this directory.
+ dnl Query sysconfig or distutils (per above) for this directory.
dnl
AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)],
[am_cv_python_pythondir],
am_cv_python_pythondir=`$PYTHON -c "
$am_python_setup_sysconfig
if can_use_sysconfig:
- sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
+ try:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to
+ # follow the prefix, as we always have.
+ # See bugs#54412, #64837, et al.
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
+ except:
+ sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
else:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
dnl 3. pyexecdir: directory for installing python extension modules
dnl (shared libraries).
- dnl Query distutils for this directory.
+ dnl Query sysconfig or distutils for this directory.
dnl
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)],
[am_cv_python_pyexecdir],
am_cv_python_pyexecdir=`$PYTHON -c "
$am_python_setup_sysconfig
if can_use_sysconfig:
- sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
+ try:
+ if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+ if scheme == 'posix_local':
+ # See scheme comments above.
+ scheme = 'posix_prefix'
+ sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
+ except:
+ sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
else:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')