Opened 4 months ago

Closed 2 months ago

#5529 closed enhancement (wontfix)

Symlink python3 to python

Reported by: thomas Owned by: lfs-book
Priority: normal Milestone: 12.3
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description

Now that Python2 is gone from the BLFS book, P3 is now 'really' the default in the LFS ecosystem. It looks like some packages expect Python to be accessable via /usr/bin/python, but our standard install does only install a /usr/bin/python3.

We could add a ln -svf python3 /usr/bin/python to make it available.

There are some packages in BLFS where we had to specify the python3 name - e.g. by adding PYTHON=/usr/bin/python3 to the build command. That is at least the case at

  • cracklib.xml
  • dbus.xml
  • fetchmail.xml
  • gpgme.xml
  • ibus.xml
  • itstool.xml
  • ldns.xml
  • libqmi.xml
  • libxml2.xml
  • samba.xml
  • sane.xml
  • subversion.xml
  • xcb-proto.xml

(that list i have created by grep -r PYTHON= /blfs/book/source/ - so it might also include 'false positives')

I assume, when Python3 is accessable via /usr/bin/python, those extra settings in BLFS packages will not be required any longer.

Change History (7)

comment:1 by Xi Ruoyao, 4 months ago

Some packages' building system enumerates python's in /usr/bin and try to build a Python extension for each version. Then it might incorrectly assume /usr/bin/python is a Python 2, but it's just a "might." (Preventing those packages from building an extension for Python 3.11 is the main reason we put Python 3.11 into /opt.)

in reply to:  1 comment:2 by thomas, 4 months ago

Replying to Xi Ruoyao:

Some packages' building system enumerates python's in /usr/bin and try to build a Python extension for each version. Then it might incorrectly assume /usr/bin/python is a Python 2, but it's just a "might." (Preventing those packages from building an extension for Python 3.11 is the main reason we put Python 3.11 into /opt.)

Yes, for sure we cannot blindly remove those options. A check that the pkg is picking up P3 correctly is definitely a good idea.

comment:3 by Xi Ruoyao, 3 months ago

Maybe let's just create the symlink in the start of the 12.3 dev cycle and adjust BLFS during the cycle.

comment:4 by Xi Ruoyao, 3 months ago

Milestone: Future12.3

If no objection let's do it in 12.3.

comment:5 by Joe Locash, 2 months ago

I'm late to the game but shouldn't this be in blfs-dev?

in reply to:  5 comment:6 by Bruce Dubbs, 2 months ago

Replying to Joe Locash:

I'm late to the game but shouldn't this be in blfs-dev?

I don't think so. If we do it is should be when Python is first installed and that would mean LFS. On the other hand most of the effects woulg be in BLFS and a discussion on blfs-dev would be appropriate.

comment:7 by Bruce Dubbs, 2 months ago

Resolution: wontfix
Status: newclosed

If this is done and a user installs Python2 for some reason, it will break the instructions for some packages. Checking around, I think the only distro that links python -> python3 is Arch.

What we have is really not broken. Let's not fix it.

Note: See TracTickets for help on using tickets.