Repo Init.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .py38 import removeprefix
|
||||
|
||||
|
||||
def consolidate_linker_args(args: list[str]) -> str:
|
||||
"""
|
||||
Ensure the return value is a string for backward compatibility.
|
||||
|
||||
Retain until at least 2024-04-31. See pypa/distutils#246
|
||||
"""
|
||||
|
||||
if not all(arg.startswith('-Wl,') for arg in args):
|
||||
return args
|
||||
return '-Wl,' + ','.join(removeprefix(arg, '-Wl,') for arg in args)
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
import sys
|
||||
|
||||
if sys.version_info < (3, 9):
|
||||
|
||||
def removesuffix(self, suffix):
|
||||
# suffix='' should not call self[:-0].
|
||||
if suffix and self.endswith(suffix):
|
||||
return self[: -len(suffix)]
|
||||
else:
|
||||
return self[:]
|
||||
|
||||
def removeprefix(self, prefix):
|
||||
if self.startswith(prefix):
|
||||
return self[len(prefix) :]
|
||||
else:
|
||||
return self[:]
|
||||
else:
|
||||
|
||||
def removesuffix(self, suffix):
|
||||
return self.removesuffix(suffix)
|
||||
|
||||
def removeprefix(self, prefix):
|
||||
return self.removeprefix(prefix)
|
||||
Reference in New Issue
Block a user