Build fails with pip-25.2 due to missing distlib.version

Host environment

  • Operating system: NetBSD
  • OS/kernel version: NetBSD iris.absd.org 11.0_BETA NetBSD 11.0_BETA (GENERIC) #0: Thu Jul 31 09:38:05 UTC 2025 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
  • Architecture: amd64
  • QEMU flavor: build issue
  • QEMU version: qemu-10.0.3
  • QEMU command line:
    ./configure

Emulated/Virtualized environment

  • Operating system:
  • OS/kernel version:
  • Architecture:

Description of problem

Attempting to build with pip-25.2 fails in mkvenv.py when it tries to "import distlib.version" as distlib.version no longer appears to be present in pip-25.2. Build completes without issue using pip-25.1.1

distlib.version appears to be used for distlib.version.LegacyMatcher - which does not appear to be present in pip-25.2

Issue still present in git HEAD (at e5859141)

Steps to reproduce

Additional information

Output:


Using './build' as the directory for build output
python determined to be '/usr/pkg/bin/python3'
python version: Python 3.12.11
mkvenv: Creating non-isolated virtual environment at 'pyvenv'

*** Ouch! ***

found no usable distlib, please install it 
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information