Add option to specify additional markers for wheel build requirements (#129949)

This commit is contained in:
Marc Mueller
2024-11-08 21:09:53 +01:00
committed by GitHub
parent 9037cb8a7d
commit 0a4c0fe7cc
2 changed files with 56 additions and 5 deletions

View File

@ -58,8 +58,16 @@ INCLUDED_REQUIREMENTS_WHEELS = {
# will be included in requirements_all_{action}.txt
OVERRIDDEN_REQUIREMENTS_ACTIONS = {
"pytest": {"exclude": set(), "include": {"python-gammu"}},
"wheels_aarch64": {"exclude": set(), "include": INCLUDED_REQUIREMENTS_WHEELS},
"pytest": {
"exclude": set(),
"include": {"python-gammu"},
"markers": {},
},
"wheels_aarch64": {
"exclude": set(),
"include": INCLUDED_REQUIREMENTS_WHEELS,
"markers": {},
},
# Pandas has issues building on armhf, it is expected they
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
@ -67,10 +75,23 @@ OVERRIDDEN_REQUIREMENTS_ACTIONS = {
"wheels_armhf": {
"exclude": {"env-canada", "noaa-coops", "pyezviz", "pykrakenapi"},
"include": INCLUDED_REQUIREMENTS_WHEELS,
"markers": {},
},
"wheels_armv7": {
"exclude": set(),
"include": INCLUDED_REQUIREMENTS_WHEELS,
"markers": {},
},
"wheels_amd64": {
"exclude": set(),
"include": INCLUDED_REQUIREMENTS_WHEELS,
"markers": {},
},
"wheels_i386": {
"exclude": set(),
"include": INCLUDED_REQUIREMENTS_WHEELS,
"markers": {},
},
"wheels_armv7": {"exclude": set(), "include": INCLUDED_REQUIREMENTS_WHEELS},
"wheels_amd64": {"exclude": set(), "include": INCLUDED_REQUIREMENTS_WHEELS},
"wheels_i386": {"exclude": set(), "include": INCLUDED_REQUIREMENTS_WHEELS},
}
IGNORE_PIN = ("colorlog>2.1,<3", "urllib3")
@ -311,6 +332,10 @@ def process_action_requirement(req: str, action: str) -> str:
return req
if normalized_package_name in EXCLUDED_REQUIREMENTS_ALL:
return f"# {req}"
if markers := OVERRIDDEN_REQUIREMENTS_ACTIONS[action]["markers"].get(
normalized_package_name, None
):
return f"{req};{markers}"
return req