2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-05 16:55:32 +00:00

use new build_platlib path with setuptools >= 61.2

(cherry picked from commit 47d68dac0f,
 adjusted to the 2.13 branch which used slightly different python
 commands. Also, utils/test/README.md doesn't exist in 2.13, therefore
 drop the part that changes it)
This commit is contained in:
Ben Greiner
2022-07-16 00:42:14 +02:00
committed by Christian Boltz
parent fd1b463643
commit 8921644ab4
3 changed files with 13 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env python3
# the build path has changed in setuptools 61.2
import sys
import sysconfig
import setuptools
if tuple(map(int,setuptools.__version__.split("."))) >= (61, 2):
identifier = sys.implementation.cache_tag
else:
identifier = "%d.%d" % sys.version_info[:2]
print("lib.%s-%s" % (sysconfig.get_platform(), identifier))