bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210)
Add --with-wheel-pkg-dir=PATH option to the ./configure script. If
specified, the ensurepip module looks for setuptools and pip wheel
packages in this directory: if both are present, these wheel packages
are used instead of ensurepip bundled wheel packages.
Some Linux distribution packaging policies recommend against bundling
dependencies. For example, Fedora installs wheel packages in the
/usr/share/python-wheels/ directory and don't install the
ensurepip._bundled package.
ensurepip: Remove unused runpy import.
diff --git a/Doc/library/ensurepip.rst b/Doc/library/ensurepip.rst
index a522125..fa1b42c 100644
--- a/Doc/library/ensurepip.rst
+++ b/Doc/library/ensurepip.rst
@@ -48,7 +48,7 @@
This invocation will install ``pip`` if it is not already installed,
but otherwise does nothing. To ensure the installed version of ``pip``
-is at least as recent as the one bundled with ``ensurepip``, pass the
+is at least as recent as the one available in ``ensurepip``, pass the
``--upgrade`` option::
python -m ensurepip --upgrade
@@ -86,7 +86,7 @@
.. function:: version()
- Returns a string specifying the bundled version of pip that will be
+ Returns a string specifying the available version of pip that will be
installed when bootstrapping an environment.
.. function:: bootstrap(root=None, upgrade=False, user=False, \
@@ -100,7 +100,7 @@
for the current environment.
*upgrade* indicates whether or not to upgrade an existing installation
- of an earlier version of ``pip`` to the bundled version.
+ of an earlier version of ``pip`` to the available version.
*user* indicates whether to use the user scheme rather than installing
globally.
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 7edc552..7fe2b96 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -621,6 +621,18 @@
don't build nor install test modules.
(Contributed by Xavier de Gaye, Thomas Petazzoni and Peixing Xin in :issue:`27640`.)
+* Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If
+ specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip``
+ wheel packages in this directory: if both are present, these wheel packages
+ are used instead of ensurepip bundled wheel packages.
+
+ Some Linux distribution packaging policies recommend against bundling
+ dependencies. For example, Fedora installs wheel packages in the
+ ``/usr/share/python-wheels/`` directory and don't install the
+ ``ensurepip._bundled`` package.
+
+ (Contributed by Victor Stinner in :issue:`42856`.)
+
C API Changes
=============