aboutsummaryrefslogtreecommitdiff
path: root/python/pip_install/pip_hub_repository_requirements_bzlmod.bzl.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'python/pip_install/pip_hub_repository_requirements_bzlmod.bzl.tmpl')
-rw-r--r--python/pip_install/pip_hub_repository_requirements_bzlmod.bzl.tmpl35
1 files changed, 35 insertions, 0 deletions
diff --git a/python/pip_install/pip_hub_repository_requirements_bzlmod.bzl.tmpl b/python/pip_install/pip_hub_repository_requirements_bzlmod.bzl.tmpl
new file mode 100644
index 0000000..4a3d512
--- /dev/null
+++ b/python/pip_install/pip_hub_repository_requirements_bzlmod.bzl.tmpl
@@ -0,0 +1,35 @@
+"""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")
+
+def entry_point(pkg, script = None):
+ """entry_point returns the target of the canonical label of the package entrypoints.
+ """
+ # TODO: https://github.com/bazelbuild/rules_python/issues/1262
+ print("not implemented")