Voice et bot modif
This commit is contained in:
parent
189d56026b
commit
7333a22bcd
10774 changed files with 634644 additions and 933308 deletions
|
|
@ -268,10 +268,18 @@ def _optional_dependencies(dist: Distribution, val: dict, _root_dir: StrPath | N
|
|||
def _ext_modules(dist: Distribution, val: list[dict]) -> list[Extension]:
|
||||
existing = dist.ext_modules or []
|
||||
args = ({k.replace("-", "_"): v for k, v in x.items()} for x in val)
|
||||
new = [Extension(**kw) for kw in args]
|
||||
new = (Extension(**_adjust_ext_attrs(kw)) for kw in args)
|
||||
return [*existing, *new]
|
||||
|
||||
|
||||
def _adjust_ext_attrs(attrs: dict) -> dict:
|
||||
# https://github.com/pypa/setuptools/issues/4810
|
||||
# In TOML there is no differentiation between tuples and lists,
|
||||
# and distutils requires tuples...
|
||||
attrs["define_macros"] = list(map(tuple, attrs.get("define_macros") or []))
|
||||
return attrs
|
||||
|
||||
|
||||
def _noop(_dist: Distribution, val: _T) -> _T:
|
||||
return val
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue