mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
limit buildpath.py setuptools version check to the relevant bits
previously, this check would fail if the setuptools version would contain non-integers. On my system, that is the case: `setuptools.__version__` is `'75.1.0.post0'` I believe it is entirely fair to just check the relevant bits and refuse to continue if those can not be checked properly. But haviong something extra on the version should not immediately cause issues (e.g. the `post0` here, or slugs like `beta`, `alpha` and the likes). Probably only very few systems are running setuptools with weird version info, but supporting this doesn't cost much, i believe. (cherry picked from commit 3302ae98e42b0a02018d4c743aa71c179377c274) Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
ae0d1aafda
commit
f90a041921
@ -7,7 +7,7 @@ import sysconfig
|
||||
import setuptools
|
||||
|
||||
|
||||
if tuple(map(int, setuptools.__version__.split("."))) >= (62, 1):
|
||||
if tuple(map(int, setuptools.__version__.split(".")[:2])) >= (62, 1):
|
||||
identifier = sys.implementation.cache_tag
|
||||
else:
|
||||
identifier = "%d.%d" % sys.version_info[:2]
|
||||
|
Loading…
x
Reference in New Issue
Block a user