Skip to content

Commit

Permalink
pipcl.py: use sysconfig.get_platform() instead of setuptools.distutil…
Browse files Browse the repository at this point in the history
…s.util.get_platform().

For now we assert these fns return the same string.
  • Loading branch information
julian-smith-artifex-com committed Jul 22, 2024
1 parent f49f756 commit 573fcd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pipcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,10 @@ def build_wheel(self,
# pypi.org.
#
import setuptools
tag_platform = setuptools.distutils.util.get_platform().replace('-', '_').replace('.', '_')
tag_platform1 = setuptools.distutils.util.get_platform()
tag_platform2 = sysconfig.get_platform()
assert tag_platform1 == tag_platform2, f'{tag_platform1=} != {tag_platform2=}'
tag_platform = tag_platform2.replace('-', '_').replace('.', '_').lower()

# We need to patch things on MacOS.
#
Expand Down

0 comments on commit 573fcd0

Please sign in to comment.