Python-3.12 doesn't seem to support setuptools by default, so we need to import
it lazily. This allows handling of `scripts/pymupdfwrap.py --venv` to install
setuptools into a venv, which will work.
import re
import shutil
import site
-import setuptools
import subprocess
import sys
import sysconfig
# PEP-425. On Linux gives `linux_x86_64` which is rejected by
# pypi.org.
#
+ import setuptools
tag_platform = setuptools.distutils.util.get_platform().replace('-', '_').replace('.', '_')
# We need to patch things on MacOS.