Foundry.BuildStage

g Foundry.BuildStage Foundry.BuildStage Foundry.Contextual Foundry.Contextual Foundry.Contextual->Foundry.BuildStage GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

Foundry.CommandStage, Foundry.LinkedPipelineStage

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

build (progress)

clean (progress)

dup_kind ()

dup_pipeline ()

dup_title ()

find_build_flags (file)

get_completed ()

get_phase ()

get_priority ()

invalidate ()

list_build_targets ()

purge (progress)

query ()

set_completed (completed)

set_kind (kind)

set_title (title)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_build (progress)

do_clean (progress)

do_find_build_flags (file)

do_get_phase ()

do_get_priority ()

do_list_build_targets ()

do_purge (progress)

do_query ()

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

completed

bool

r/w/en

kind

str

r/w/en

phase

Foundry.BuildPipelinePhase

r

pipeline

Foundry.BuildPipeline

r

priority

int

r

title

str

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.BuildStage(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.BuildStageClass

A single state in a build pipeline.

Abstrct base class for implementing custom stages in the build pipeline.

build(progress)
Parameters:

progress (Foundry.BuildProgress) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Run the build for the stage.

clean(progress)
Parameters:

progress (Foundry.BuildProgress) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Clean operation for the stage.

This is used to perform an equivalent of a make clean or ninja clean for the build. It is not necessary on all stages but any stage may implement it.

dup_kind()
Returns:

the kind of the stage such as “flatpak”

Return type:

str or None

dup_pipeline()
Returns:

a [class`Foundry`.BuildPipeline] or None

Return type:

Foundry.BuildPipeline or None

dup_title()
Returns:

the title of the stage

Return type:

str or None

find_build_flags(file)
Parameters:

file (Gio.File) –

Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.BuildFlags].

Return type:

Dex.Future

Locates the compiler flags used to when compiling file.

Most build stages will not know about any build flags and therefore do not need to implement this function.

get_completed()
Return type:

bool

get_phase()
Return type:

Foundry.BuildPipelinePhase

get_priority()
Return type:

int

invalidate()
list_build_targets()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.BuildTarget] or rejects with error.

Return type:

Dex.Future

Lists the available [class`Foundry`.BuildTarget] known to the stage.

Most build stages will not know about any build targets and therefore do not need to implement this function.

purge(progress)
Parameters:

progress (Foundry.BuildProgress) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Purge operation for the stage.

This is used to perform a purge of an existing pipeline.

The purge command is run when doing a rebuild.

query()
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Query information about the state of the stage and update as necessary.

Some implementations may choose to look at the state of contents on disk and mark the stage as completed without running. Alternatively, they may use it to mark a stage as needing to be run.

set_completed(completed)
Parameters:

completed (bool) –

set_kind(kind)
Parameters:

kind (str) –

set_title(title)
Parameters:

title (str) –

do_build(progress) virtual
Parameters:

progress (Foundry.BuildProgress) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Run the build for the stage.

do_clean(progress) virtual
Parameters:

progress (Foundry.BuildProgress) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Clean operation for the stage.

This is used to perform an equivalent of a make clean or ninja clean for the build. It is not necessary on all stages but any stage may implement it.

do_find_build_flags(file) virtual
Parameters:

file (Gio.File) –

Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.BuildFlags].

Return type:

Dex.Future

Locates the compiler flags used to when compiling file.

Most build stages will not know about any build flags and therefore do not need to implement this function.

do_get_phase() virtual
Return type:

Foundry.BuildPipelinePhase

do_get_priority() virtual
Return type:

int

do_list_build_targets() virtual
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.BuildTarget] or rejects with error.

Return type:

Dex.Future

Lists the available [class`Foundry`.BuildTarget] known to the stage.

Most build stages will not know about any build targets and therefore do not need to implement this function.

do_purge(progress) virtual
Parameters:

progress (Foundry.BuildProgress) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Purge operation for the stage.

This is used to perform a purge of an existing pipeline.

The purge command is run when doing a rebuild.

do_query() virtual
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with an error.

Return type:

Dex.Future

Query information about the state of the stage and update as necessary.

Some implementations may choose to look at the state of contents on disk and mark the stage as completed without running. Alternatively, they may use it to mark a stage as needing to be run.

Property Details

Foundry.BuildStage.props.completed
Name:

completed

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.BuildStage.props.kind
Name:

kind

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.BuildStage.props.phase
Name:

phase

Type:

Foundry.BuildPipelinePhase

Default Value:

Foundry.BuildPipelinePhase.NONE

Flags:

READABLE

Foundry.BuildStage.props.pipeline
Name:

pipeline

Type:

Foundry.BuildPipeline

Default Value:

None

Flags:

READABLE

Foundry.BuildStage.props.priority
Name:

priority

Type:

int

Default Value:

0

Flags:

READABLE

Foundry.BuildStage.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY