On 2/9/21 9:29 PM, Ken Moffat wrote:
On Tue, Feb 09, 2021 at 03:24:53PM -0500, Baho Utot wrote:
A note should be placed in the book about --with-ensurepip=yes.

It will not build pip, setuptools and wheel if they are already installed on
the system.

Rebuilding python3 will not rebuild pip, setuptools and wheel as it detects
that they are already installed on the system.

Even if they are older than the package currently being built.

./configure --prefix=/usr \
     --enable-shared \
     --with-system-expat \
     --with-system-ffi \
     --with-ensurepip=yes

Hi Scott,

did you mean to post this to blfs-support rather than lfs-support ?

In LFS the first build has --without-ensurepip so the second build
should install it, and both will be for the same version.

I don't think I have a system upgraded from 3.9 to 3.9.1 (been too
busy working on systems with 3.9.1), but on the current system
(3.9.1 in LFS, rebuilt in BLFS) in LFS it installed
/usr/lib/python3.9/site-packages/setuptools
/usr/lib/python3.9/site-packages/setuptools-49.2.1.* with
/usr/lib/python3.9/site-packages/setuptools/__init__.py and various
/usr/lib/python3.9/site-packages/setuptools/__pycache__/*.pyc and
various other files in /usr/lib/python3.9/site-packages/setuptools/
and its subdirectories.

When I rebuilt it in BLFS it seems to have overwritten one or two of
those files and added a load more.  and the same for pip although
the only identifier for pip i nthe rebuild seems to be cpython-39
whereas in LFS chapter 8 I see pip-20.2.3.dist-info.

I'm willing to believe that upgrading minor versions of python might
not upgrade pip and setuptools.  But I'm not a pythonista, so I have
to ask: does it matter ?


It does matter because if setuptools is missing you can not install or build any python modules




If you do need to upgrade it (latest is now apparently v21.0.1,
which dropped support for python2), according to
https://pip.pypa.io/en/stable/installing/#upgrading-pip
you can run python -m pip install -U pip (assuming you have python
symlinked to python3, which will break seamonkey and qtwebengine
out of packages in BLFS).

Not if pip doesn't exist it.


Since you use a package manager, doing that as a regular user will
install in ~/.local/bin but all it actually does is install pip, pip3,
pip3.9.  I conclude that setuptools will NOT be upgraded, and I will
be surprised if pip, pip3 or pip3.9 ever change.

ĸen


PIP will not be installed either.  Your entire python installation is broken.

  Things like ninja and meson will fail to build.

As I stated before, setuptools, pip and wheel will not be installed and everything else that you try to build will fail if it requires setup tools.  you will also not be able to use the "installed python" to fix the issue.


Check archlinux, They don't use ensurepip in their python building, because of this issue.  You are left with a broken system.

I build python without the ensurepip switch and then build setuptools, pip and wheel as modules.  It is the only way you can get a functioning python installation when using a package manager.

You folks don't get the problem because you do not use a package manager.


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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to