On 26 April 2016 at 22:27, Ken Moffat <[email protected]> wrote:
> On Tue, Apr 26, 2016 at 01:42:02PM -0500, Bruce Dubbs wrote:
>> alex lupu wrote:
>> > On my 32-bit BLFS system, I was building 'glib-2.48.0' (the latest).
>> > It failed on 'make'.  I had run 'configure' WITHOUT the suggested
>> >   --with-python=/usr/bin/python3
>> > (served me right!  Or did it?)
>> >
>> > In '/usr/bin' I had:
>> >
>> >    python2 -> python2.7
>> >   python -> python2
>> >   10307 bytes, python2.7 (Python 2.7.11 - the latest)
>> >
>> > and
>> >
>> >   python3 -> python3.5
>> > 12566 bytes, python3.5 (Python 3.5.1 - the latest).
>> >
>> > No big deal;  I pointed 'python' to Python 3, i.e.,
>> >   python -> python3
>> >
>> > and 'make' worked fine (as expected?) this time.
>> > However, all this got me thinking:
>> >
>> > QUESTION
>> > What is the recommended Python configuration in '/usr/bin' ?
>>
>> I use:
>>
>> $ ls /usr/bin/pyth* -l
>> lrwxrwxrwx 1 root root     7 Mar 26 18:38 /usr/bin/python -> python2
>> lrwxrwxrwx 1 root root    14 Mar 26 18:38 /usr/bin/python-config ->
>> python2-config
>> lrwxrwxrwx 1 root root     9 Mar 26 18:38 /usr/bin/python2 -> python2.7
>> lrwxrwxrwx 1 root root    16 Mar 26 18:38 /usr/bin/python2-config ->
>> python2.7-config
>> -rwxr-xr-x 1 root root 10392 Mar 26 18:38 /usr/bin/python2.7
>> -rwxr-xr-x 1 root root  1681 Mar 26 18:38 /usr/bin/python2.7-config
>> lrwxrwxrwx 1 root root     9 Feb 23 15:03 /usr/bin/python3 -> python3.5
>> lrwxrwxrwx 1 root root    16 Feb 23 15:03 /usr/bin/python3-config ->
>> python3.5-config
>> -rwxr-xr-x 2 root root 13960 Feb 23 15:03 /usr/bin/python3.5
>> lrwxrwxrwx 1 root root    17 Feb 23 15:03 /usr/bin/python3.5-config ->
>> python3.5m-config
>> -rwxr-xr-x 2 root root 13960 Feb 23 15:03 /usr/bin/python3.5m
>> -rwxr-xr-x 1 root root  3085 Feb 23 15:03 /usr/bin/python3.5m-config
>>
>> This makes python2 the default, but you are free to change the python and
>> python-config symlinks.
>>
>>   -- Bruce
>>
> If I'm reading Alex right, that is what he had - and changing it
> could be unwise (distros - I think fedora and gentoo - have been
> trying to move to python3 for some years, and ISTR that there are
> still a lot of pythonic packages (nt necessarily in BLFS) which only
> build with 2.
>
> I have not done a fresh build since 7.9, so I haven't tried a newer
> glib - but it is worrying if it expect 'python' to be v3 : the v3
> name has been python3 for several releases.
>
> The switch is to tell configure to use python3 rather than python2,
> so it is supposed to be able to build without 3 (and I hope that is
> still true).

Yes, it's a mess.  The Python Community claims that Python 3 is the
default, but, as we know, so many packages are still built with Python
2.  I fell foul of this when installing Ansible on an Arch Linux
distro.  Arch has defaulted to Python 3, that is, /usr/bin/python now
points to python3.  The Ansible maintainers claim that Red Hat is the
reason why they cannot move to Python 3, because Python 2 is still the
default on RHEL and CentOS.

 There is a Python 2 to Python 3 translator called, unsurprisingly,
2to3.  I have no experience of it though.

As Python 3 has been around for some considerable time, maybe the
complaint should be laid at the door of the package maintainers that
are still relying on Python 2.

Richard
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to