package_info
Rules
package_info
load("@rules_cc_autoconf//autoconf:package_info.bzl", "package_info")
package_info(name, aliases, module_bazel, package_bugreport, package_name, package_tarname,
package_url, package_version, strip_bcr_version)
A rule for parsing module info from MODULE.bazel files.
This rule is most useful when paired with the autoconf rule.
Example:
load("@rules_cc_autoconf//autoconf:autoconf.bzl", "autoconf")
load("@rules_cc_autoconf//autoconf:package_info.bzl", "package_info")
package_info(
name = "package_info",
module_bazel = "//:MODULE.bazel",
)
autoconf(
name = "config_h",
out = "config.h",
checks = [
# ...
],
deps = [
":package_info",
],
)
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| aliases | Additional variables to define that are mirrored by the provided value variable. | Dictionary: String -> String | optional | {} |
| module_bazel | A MODULE.bazel file to parse module information from. Mutually exclusive with package_name and package_version. | Label | optional | None |
| package_bugreport | The package bug report email/URL. Used to populate PACKAGE_BUGREPORT define. | String | optional | "" |
| package_name | The package name. Must be provided together with package_version if module_bazel is not provided. | String | optional | "" |
| package_tarname | Exactly tarname, possibly generated from package. | String | optional | "" |
| package_url | The package home page URL. Used to populate PACKAGE_URL define. | String | optional | "" |
| package_version | The package version. Must be provided together with package_name if module_bazel is not provided. | String | optional | "" |
| strip_bcr_version | Whether or not to strip .bcr.* suffixes from module_bazel parsed versions. | Boolean | optional | False |