--- Begin Message ---
Subject: |
AM_PATH_PYTHON incompatible with Python frameworks on macOS |
Date: |
Fri, 19 Apr 2019 23:38:55 +0800 |
Hi Automake experts,
On macOS, if CPython is configured with --enable-framework (default
for MacPorts [1]), Python packages should be installed in
${prefix}/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages.
However, AM_PATH_PYTHON gives
pythondir=${prefix}/lib/python3.7/site-packages.
Here's a minimal example configure.ac:
AC_PREREQ(2.57)
AC_INIT([automake-python-test], 0.1)
AM_INIT_AUTOMAKE([foreign])
AM_PATH_PYTHON([2.7])
AC_CONFIG_FILES([Makefile])
The issue appears to be that AM_PATH_PYTHON overwrites the 'base'
variable. If we remove this overwrite like [2], pythondir contains the
correct path.
Related bug report in MacPorts: https://trac.macports.org/ticket/57329
Regards,
Chih-Hsuan Yen
[1]
https://github.com/macports/macports-ports/blob/834d761210be0d989076000c454a4a1e32209af5/lang/python37/Portfile#L57
[2]
https://github.com/macports/macports-ports/blob/master/devel/automake/files/patch-issue57329.diff
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#35322: AM_PATH_PYTHON incompatible with Python frameworks on macOS |
Date: |
Tue, 18 May 2021 16:15:56 -0600 |
Hi Joshua and all - regarding https://bugs.gnu.org/35322, I have
(finally) pushed your patches. I tweaked the doc update a little bit and
created a new test to try out the --with-python_prefix and
--with-python_exec_prefix options. (I left the underscores in the name
since I saw there were other such cases already. Confusing either way,
so fine.)
Thanks much for doing all the work. --karl
--- End Message ---