Subject: bug#35322: closed (Re: bug#35322: AM_PATH_PYTHON incompatible with Python frameworks on macOS)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 18 May 2021 22:16:02 +0000

Your bug report

#35322: AM_PATH_PYTHON incompatible with Python frameworks on macOS

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35322: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35322
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#35322: AM_PATH_PYTHON incompatible with Python frameworks on macOS
From: Karl Berry <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Tue, 18 May 2021 16:15:56 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: AM_PATH_PYTHON incompatible with Python frameworks on macOS
From: Chih-Hsuan Yen <[email-masked]>
To: [email-masked]
Cc: Joshua Root <[email-masked]>
Date: Fri, 19 Apr 2019 23:38:55 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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