blob: 53d4ee99c44ceef2c68415370fb7983d359b3b44 [file] [log] [blame]
"""Starlark representation of locked requirements.
@generated by rules_python pip_parse repository rule
from %%REQUIREMENTS_LOCK%%.
This file is different from the other bzlmod template
because we do not support entry_point yet.
"""
all_requirements = %%ALL_REQUIREMENTS%%
all_whl_requirements = %%ALL_WHL_REQUIREMENTS%%
all_data_requirements = %%ALL_DATA_REQUIREMENTS%%
def _clean_name(name):
return name.replace("-", "_").replace(".", "_").lower()
def requirement(name):
return "%%MACRO_TMPL%%".format(_clean_name(name), "pkg")
def whl_requirement(name):
return "%%MACRO_TMPL%%".format(_clean_name(name), "whl")
def data_requirement(name):
return "%%MACRO_TMPL%%".format(_clean_name(name), "data")
def dist_info_requirement(name):
return "%%MACRO_TMPL%%".format(_clean_name(name), "dist_info")