On 11/2/20 4:35 PM, Ken Moffat via blfs-dev wrote:
On Wed, Oct 21, 2020 at 10:48:39PM -0500, Bruce Dubbs via blfs-dev wrote:

In LFS, we can make the symlink to p3.  For p2 in BLFS, we will use 'make
altinstall'.  Everything else would be for non-python packages that either
use p2 or create a p2 module.


I've now completed my build using altinstall.  Comments on various
packages:

python2 itself: The only programs it installed were:
  2to3
  easy_install-2.7
  idle
  pip2.7
  pydoc
  python2.7
  python2.7-config
  smtpd.py

Note that it did NOT overwrite pip, but it did overwrite 2to3 (the
versions of that are currntnly similari except for the version of
python, but if we're going to do this I suggest that we save the
installed 2to3 from LFS and use that to verwrite the py2 version
post-install.

Note also that the python2 symlink was not installed.  Mostly not a
problem, but qtwebengine is of course a right pain.

If we go for altinstall, I'd be happier if someone else first
confirms what python2 installs.

 From here onwards, I altered my scripts so that python2.7 and
python2.7 are not normally available (renamed), but with a function
to enable them when needed.

In general, using altinstall means that whenever we want to use
python2 we have to specify python2.7.

I've built the following packages using 2.7:

001. libxml2 python2 module: python2.7 setup.py ...

I now see that my build of libxslt does NOT build python, and that I
had moved the py2 module to a separate script - and then stopped
building that because I no-longer attempt to build the gimp-help
files.

002. pycairo2: python2.7 setup.py ...

003. pygobject2: PYTHON=/usr/bin/python2.7 ./configure ...

004. pygtk: PYTHON=/usr/bin/python2.7 ./configure ...

005. gimp-2.10: no action necessary, it finds 2.7

006. seamonkey: no action necessary, it finds 2.7

007. qtwebengine

Fedora have a patch to use python2, I did that with a sed:
  sed -i 's/\$\$python /python2 /' src/webengine/module.pro

I tried changing that to python2.7, but whatever parses the pro file
seems to treat '.' as a possible field break, resulting in it
looking for python2 (only) and not finding it.  That doesn't
actually break the build, it warns that WebEngine etc will not be
built, and exits successfully without doing anything.

In the end, I used the sed to get it to use python2, and then
created a /usr/bin/python2 symlink for the duration of the build.
I also created a /usr/bin/python2-config symlink, unsure if it
really needed that.

008. dbus-python: PYTHON=/usr/bin/python2.7 ...

I have no idea if anything in the book still needs the python2
module.  I suspect that most things have moved on.

Links to python2 from the following are already commented out in the
book's source: mercurial, swig, usb-utils.

The book still builds the following other modules for both, but I see
no point in building for python2 nowadays:
  lxml,
  MarkupSafe,
  PyYAML,
  six.
For six we recommend python2 as well as 3, but I've been building
only with 3 for three and a half years).

If altinstall does not create the /usr/bin/python2 symlink, then we should create it ourselves. I agree that it would be preferable to use the p3 version of 2to3.

The only definitive way to check out what is needed is to not built the p2 modules (except those we know are needed for pygtk) and build all of BLFS. Then see what breaks.

Maybe I'll try to start that later this week, but right now I'm too damned hung up on the election.

  -- Bruce

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

Reply via email to