Skip to content

Commit

Permalink
pipcl.py: avoid problems with python-3.12 and setuptools.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
julian-smith-artifex-com committed Feb 2, 2024
1 parent c8e13ae commit c2363f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import re
import shutil
import site
import setuptools
import subprocess
import sys
import sysconfig
Expand Down Expand Up @@ -559,6 +558,7 @@ def build_wheel(self,
# 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.
Expand Down

0 comments on commit c2363f5

Please sign in to comment.