capsule_can_publish()
def capsule_can_publish(capsule)
Check if the capsule can be published.
Args
capsule
- return value of capsule_declare()
Returns
bool
True if the capsule can be published
capsule_checkout_add_repo()
def capsule_checkout_add_repo(capsule, run_name, clone)
Args
capsule
-run_name
-clone
-
capsule_declare()
def capsule_declare(domain, owner, repo, version, capsule_deps, source_directory, rev, archive_suffix, install_path, oras_url, platform_name, gh_deploy_repo, is_use_source)
Declare a capsule.
Args
domain
-str
The domain of the capsuleowner
-str
The owner of the capsulerepo
-str
The repo of the capsuleversion
-str
The version of the capsulecapsule_deps
-[dict]
The dependencies of the capsule (as returned by another call to capsule_declare())source_directory
-str
location of the source directory (default is infer from domain/org/repo)rev
-str
The revision of the source code. If empty, the value is version with av
prefixed.archive_suffix
-str
The suffix of the archiveinstall_path
-str
The install path of the capsuleoras_url
-str
The oras url of the capsule (None to deploy to gh releases)platform_name
-str
Platform name of the capsule (default is infer from the host platform)gh_deploy_repo
-str
The github deploy repo of the capsule (None to skip deployment).is_use_source
-bool
Whether to use the source code or check for a binary release
Returns
dict
The capsule definition
capsule_get_build_path()
def capsule_get_build_path(capsule)
Get the build path of the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str
The build path of the capsule
capsule_get_checkout_type()
def capsule_get_checkout_type(capsule, run_name)
This will either download pre-built binaries matching the capsule or checkout the source to build the capsule.
Args
capsule
- return value of capsule_declare()run_name
- the name of the optional run target to activate if pre-built binaries are not available
Returns
CHECKOUT_TYPE_OPTIONAL if the binary was downloaded
capsule_get_deps()
def capsule_get_deps(capsule)
Get the dependencies of the capsule.
The deps must all be declared in the same spaces file.
Args
capsule
- return value of capsule_declare()
Returns
list: The dependencies of the capsule
capsule_get_domain()
def capsule_get_domain(capsule)
Get the domain of the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str
: The domain of the capsule
capsule_get_install_path()
def capsule_get_install_path(capsule)
Get the install path of the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str
: The install path of the capsule
capsule_get_owner()
def capsule_get_owner(capsule)
Get the owner of the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str
: The owner of the capsule
capsule_get_prefix_paths()
def capsule_get_prefix_paths(capsule)
Get the prefix paths of the capsule dependencies.
Args
capsule
- return value of capsule_declare()
Returns
list: The prefix paths of the capsule dependencies. This can be used by cmake targets to find the dependencies.
capsule_get_publish_name()
def capsule_get_publish_name(capsule)
Gets the name of the publish rule associated with this capsule.
Args
capsule
- return value of capsule_declare()
Returns
str: the name of the publish rule
capsule_get_repo()
def capsule_get_repo(capsule)
Get the repo of the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str
: The repo of the capsule
capsule_get_rule_name()
def capsule_get_rule_name(capsule, suffix)
Get the rule name for the capsule.
Args
capsule
- return value of capsule_declare()suffix
- The suffix to append to the rule name
Returns
str
: The rule name
capsule_get_run_name()
def capsule_get_run_name(capsule)
Gets the name of the run rule associated with this capsule.
Dependents should depend on this rule to build the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str: the name of the run rule
capsule_get_version()
def capsule_get_version(capsule)
Get the version of the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str
: The version of the capsule
capsule_get_workspace_path()
def capsule_get_workspace_path(capsule)
Gets the workspace path to the capsule.
Args
capsule
- return value of capsule_declare()
Returns
str: the workspace path to the capsule
capsule_publish()
def capsule_publish(capsule, deps)
Relocate the capsule and publish to github.
Args
capsule
- return value of capsule_declare()deps
- The dependencies of the capsule
capsule_publish_add_run_target()
def capsule_publish_add_run_target(capsule, run_name)
Add the checkout and run if the install path does not exist
Args
capsule
- return value of capsule_declare()run_name
- The run rule that will build and install (not publish) the target