livery.extensions.conan¶
livery.extensions.conan ¶
The conan extension's names another extension reads to build against its packages.
The conan extension builds a member whose recipe, conanfile.py,
names a reference into the conan cache, and releases it. An extension
whose builds link such a member reads six of its names. The
workspace's conan members resolve one another from their sources
through the conan workspace file at the root,
livery.extensions.conan.WORKSPACE_FILE, whose text
livery.extensions.conan.workspace_file renders.
livery.extensions.conan.workspace_aside hides that file for a
block, so a build in it resolves each member from the conan cache.
A release's build saves the package it created out of the cache with
livery.extensions.conan.save_cache, one file per host, and
livery.extensions.conan.restore_from_releases restores a released
version from the member's release on the forge. A release's stamp
raises the floors a recipe declares on the members released with it
through livery.extensions.conan.raise_floors, a consumer's recipe
among them.
Functions:
| Name | Description |
|---|---|
raise_floors |
Raise each requirement on a member released with package; the files changed. |
restore_from_releases |
Restore name at version from its release into the conan cache. |
save_cache |
Save this host's built package out of the conan cache; the file. |
workspace_aside |
Hide root's conan workspace for the block, so members resolve from the cache. |
workspace_file |
The conan workspace file for root: each conan member, from its source. |
Attributes:
| Name | Type | Description |
|---|---|---|
WORKSPACE_FILE |
|
|
__version__ |
|
__all__
module-attribute
¶
__all__ = ['WORKSPACE_FILE', '__version__', 'raise_floors', 'restore_from_releases', 'save_cache', 'workspace_aside', 'workspace_file']
raise_floors ¶
Raise each requirement on a member released with package; the files changed.
floors names each such member by its path, to the version it
releases at. A reference to that member in the recipe in the range
form a requirement writer writes, "<name>/[>=<floor>]", takes
that version, in a recipe that names a reference and in a
consumer's alike. Empty for no floors, for a package with no
recipe, and for a recipe that names none of them.
Source code in packages/extensions/conan/src/livery/extensions/conan/_package.py
restore_from_releases ¶
Restore name at version from its release into the conan cache.
The consumer's half of the releases route: the member's release
is read for this host's saved cache, the bytes are checked
against the digest the forge reports, and conan cache
restore puts the package where a build resolves it.
Raises:
| Type | Description |
|---|---|
Failed
|
when the member is unknown here, the release carries no cache for this host, or the bytes do not match the digest. |
Source code in packages/extensions/conan/src/livery/extensions/conan/_package.py
save_cache ¶
Save this host's built package out of the conan cache; the file.
The release matrix runs one leg per wheel platform: each leg
creates the package for its own host and saves it here, the
collection gathers every leg's file, and the wave attaches them
all to the member's release. conan cache restore reads one
back on any machine.
Raises:
| Type | Description |
|---|---|
Failed
|
when conan refuses the save; the message carries its output. |
Source code in packages/extensions/conan/src/livery/extensions/conan/_package.py
workspace_aside ¶
Hide root's conan workspace for the block, so members resolve from the cache.
A release leg builds what the release ships: a member's
conan create and an extension's wheel resolve a sibling to the
package the leg created, never to its source tree. Conan finds the
workspace from the directory a command runs in and has no switch
to ignore it, so the file moves aside for the block and comes back
after it, a failure included. A leg killed inside the block leaves
the file aside, and the next sync writes it again.
Source code in packages/extensions/conan/src/livery/extensions/conan/_package.py
workspace_file ¶
The conan workspace file for root: each conan member, from its source.
The fragment this extension declares: the workshop writes it at the root while a package's set holds conan and withdraws it with the last package that did. A package that lists conan, or an extension that requires it, holds it (livery.workshop.extension_set). The members are listed in path order.
Conan finds the file by walking up from the directory a command
runs in, so a command inside the workspace resolves each member
from its source tree, and one outside resolves it from the cache
or a remote. Nothing is registered in the conan home, so a
workspace leaves nothing behind, and each checkout of a repository
resolves to its own sources. An entry names its member by path
alone: conan reads the reference from the recipe's name and
version, so the file stays right when a release stamps the
version.
A member whose recipe names no reference is left out: conan
deduces a workspace package's reference from the recipe's name
and version, and a consumer's recipe, requirements alone, is
what conan installs for, never a workspace package.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
The workspace root, whose members the file lists. |
required |
absolute
|
bool
|
Whether each entry is the member's absolute POSIX path, for a copy placed outside the root: a Linux build container mounts the root at its host path and reads such a copy beside the package it builds. False writes the paths relative to the root, for the file the root holds. |
False
|
Source code in packages/extensions/conan/src/livery/extensions/conan/_package.py
__getattr__ ¶
Serve a public name from its module, each time it is read.
The value is never kept here, so a test that patches the name in its module is read through.