Subject: bug#10227: Python installation fails for Python 3

From: Reuben Thomas <[email-masked]>
Date: Wed, 21 Nov 2012 17:58:47 +0000

On 21 November 2012 13:41, Stefano Lattarini <[email-masked]>wrote:

> tags 10227 + moreinfo
> thanks
>
> Hi Roumen, Reuben.
>
> I'm going through old open bugs, and I've noticed this one.  Is the
> problem still present, after the recent updates to the python support?
> (They should be already merged in the maint branch by now)  If yes,
> could you please provide me with a minimal, clear reproducer, or at
> least restart this discussion from the basics?
>

I've just checked out the maint branch of automake, and I still see exactly
the same problem: in m4/python.m4 the code used to get the Python package
directory is:

am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import
sysconfig;
sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))"

Assuming the default am_py_prefix of /usr/local, this gives:

$ python3
Python 3.2.3 (default, Oct 19 2012, 19:53:16)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import sysconfig; print
(sysconfig.get_python_lib(0,0,'/usr/local'))
/usr/local/lib/python3/dist-packages

i.e. exactly the same incorrect result as before (the correct answer is:

/usr/local/lib/python3.2/dist-packages

on my Ubuntu 12.10 system). I'm sorry, I can't tell whether, as Roumen
suggests, this is an Ubuntu packaging bug, or an automake bug. It seems to
me that this is the sort of thing the pyconfigure people ought to know
about.

-- 
http://rrt.sc3d.org