Foundry.Sdk¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
|||
r/w/en |
|||
r |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Foundry.Sdk(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Represents a software development kit (SDK).
Foundry.Sdkprovides information about available SDKs including their architecture, installation status, and capabilities. It integrates with SDK providers to manage SDK discovery, installation, and configuration for various development platforms and toolchains.- build_simple(pipeline, argv)¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline]argv (
str) – the arguments to run
- Returns:
a [class`Dex`.Future] that resolves to a UTF-8 encoded string or rejects with error.
- Return type:
This is a much simplified interface for [method`Foundry`.Sdk.prepare_to_build] for consumers that just want to run a simple command and get the stdout output of the command.
Use this when you want to quickly run something like
program --versionwhen setting up the pipeline.New in version 1.1.
- contains_program(program)¶
- Parameters:
program (
str) – the program such as “ps”- Returns:
a [class`Dex`.Future] that resolves to a string containing the path of program.
- Return type:
Looks for program within the SDK.
- discover_shell()¶
- Returns:
a [class`Dex`.Future]
- Return type:
Tries to discover the shell to use within the SDK.
This will look at the users preferred shell and try to locate that within the container environment.
- dup_config_option(option)¶
- Parameters:
option (
Foundry.SdkConfigOption) –- Returns:
a string containing the config option or
Noneif unset.- Return type:
Gets a config option that should be used as the default to work with this particular SDK.
- dup_kind()¶
- Returns:
a newly allocated string
- Return type:
Gets the user-visible kind for the SDK.
- dup_name()¶
- Returns:
a newly allocated string
- Return type:
Gets the user-visible name for the SDK.
- get_eol()¶
-
Gets whether the SDK has reached end of life.
New in version 1.1.
- install(operation, cancellable)¶
- Parameters:
operation (
Foundry.Operation) – a [class`Foundry`.Operation]cancellable (
Dex.CancellableorNone) – a [class`Dex`.Cancellable]
- Returns:
a [class`Dex`.Future] that resolves to a boolean.
- Return type:
Installs an SDK.
- prepare_to_build(pipeline, launcher, phase)¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline] orNonelauncher (
Foundry.ProcessLauncher) – the launcher to preparephase (
Foundry.BuildPipelinePhase) – the phase of the build
- Returns:
a [class`Dex`.Future]
- Return type:
Prepares launcher to be able to build applications.
That may mean setting things up to access a SDK tooling or other compoonents.
phase is used to differentiate between different types of launchers. For example, you may apply a different environment for building dependencies than for the project itself.
- prepare_to_run(pipeline, launcher)¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline] orNonelauncher (
Foundry.ProcessLauncher) – the launcher to prepare
- Returns:
a [class`Dex`.Future]
- Return type:
Prepares launcher to be able to run applications.
That may mean setting things up to access a display server, network, or other compoonents.
- set_arch(arch)¶
- Parameters:
arch (
str) –
Set the architecture of the SDK.
This should only be called by [class`Foundry`.SdkProvider] classes.
- set_id(id)¶
- Parameters:
id (
str) –
Set the unique id of the SDK.
This should only be called by implementations of
Foundry.SdkProvider.
- set_kind(kind)¶
- Parameters:
kind (
str) –
Set the user-visible kind of the sdk.
This should only be called by implementations of
Foundry.SdkProvider.
- set_name(name)¶
- Parameters:
name (
str) –
Set the user-visible name of the sdk.
This should only be called by implementations of
Foundry.SdkProvider.
- translate_path(pipeline, path)¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline]path (
str) – the path within the SDK to be translated
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.File] or rejects with error.
- Return type:
This function should be implemented by SDKs so that you can convert a path within the container to a path outside the container.
For example, if we want to know where to find the location of
/usr/share/gir-1.0/GLib-2.0.girwithin the SDK (or pipeline build) we could use this function to get a path available from our current environment which might route throughfile:///var/run/host/....New in version 1.1.
- do_contains_program(program) virtual¶
- Parameters:
program (
str) – the program such as “ps”- Returns:
a [class`Dex`.Future] that resolves to a string containing the path of program.
- Return type:
Looks for program within the SDK.
- do_dup_config_option(option) virtual¶
- Parameters:
option (
Foundry.SdkConfigOption) –- Returns:
a string containing the config option or
Noneif unset.- Return type:
Gets a config option that should be used as the default to work with this particular SDK.
- do_get_eol() virtual¶
-
Gets whether the SDK has reached end of life.
New in version 1.1.
- do_install(operation, cancellable) virtual¶
- Parameters:
operation (
Foundry.Operation) – a [class`Foundry`.Operation]cancellable (
Dex.CancellableorNone) – a [class`Dex`.Cancellable]
- Returns:
a [class`Dex`.Future] that resolves to a boolean.
- Return type:
Installs an SDK.
- do_prepare_to_build(pipeline, launcher, phase) virtual¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline] orNonelauncher (
Foundry.ProcessLauncher) – the launcher to preparephase (
Foundry.BuildPipelinePhase) – the phase of the build
- Returns:
a [class`Dex`.Future]
- Return type:
Prepares launcher to be able to build applications.
That may mean setting things up to access a SDK tooling or other compoonents.
phase is used to differentiate between different types of launchers. For example, you may apply a different environment for building dependencies than for the project itself.
- do_prepare_to_run(pipeline, launcher) virtual¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline] orNonelauncher (
Foundry.ProcessLauncher) – the launcher to prepare
- Returns:
a [class`Dex`.Future]
- Return type:
Prepares launcher to be able to run applications.
That may mean setting things up to access a display server, network, or other compoonents.
- do_translate_path(pipeline, path) virtual¶
- Parameters:
pipeline (
Foundry.BuildPipelineorNone) – a [class`Foundry`.BuildPipeline]path (
str) – the path within the SDK to be translated
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.File] or rejects with error.
- Return type:
This function should be implemented by SDKs so that you can convert a path within the container to a path outside the container.
For example, if we want to know where to find the location of
/usr/share/gir-1.0/GLib-2.0.girwithin the SDK (or pipeline build) we could use this function to get a path available from our current environment which might route throughfile:///var/run/host/....New in version 1.1.
Property Details¶
- Foundry.Sdk.props.arch¶
- Name:
arch- Type:
- Default Value:
- Flags:
- Foundry.Sdk.props.eol¶
-
Whether the SDK has reached end of life.
New in version 1.1.
- Foundry.Sdk.props.extension_only¶
- Name:
extension-only- Type:
- Default Value:
- Flags:
- Foundry.Sdk.props.id¶
- Name:
id- Type:
- Default Value:
- Flags:
- Foundry.Sdk.props.installed¶
- Name:
installed- Type:
- Default Value:
- Flags:
- Foundry.Sdk.props.kind¶
- Name:
kind- Type:
- Default Value:
- Flags:
- Foundry.Sdk.props.name¶
- Name:
name- Type:
- Default Value:
- Flags:
- Foundry.Sdk.props.provider¶
- Name:
provider- Type:
- Default Value:
- Flags: