spl-west-deps
An spl-core build extension that installs the west dependencies of a variant.
The dependencies of an SPL are declared in west manifests: one at the project root for what every variant needs, and one per variant for what that variant adds or pins differently. The extension resolves both, installs them, and tells CMake where they landed, so a variant can consume a dependency without any consumer hard-coding the workspace layout.
The install itself is done by pypeline's
WestInstall step, which already merges several manifests, installs them and
reports where each dependency landed. This extension builds the execution context
that step reads, and turns its result into CMake variables.
Installation
Install this via pip (or your favorite package manager):
pip install spl_west_deps
Then, in the consuming spl-core project's CMakeLists.txt, after spl.cmake and
before the variant parts are included:
include(".venv/Lib/site-packages/spl_west_deps/index.cmake")
include(${PROJECT_SOURCE_DIR}/variants/${VARIANT}/parts.cmake)
The order matters: parts.cmake calls spl_add_component() on components whose
sources come from the dependencies, so the dependencies must be installed first.
Remove any west step from the project's own pipeline when you enable this extension. Two resolvers writing one workspace fight over the checkouts.
Usage
The extension needs no CMake target and no command of its own. It runs during the CMake configuration and defines one variable per dependency:
| Dependency name in the manifest | CMake variable |
|---|---|
brightness-controller |
MODULE_BRIGHTNESS_CONTROLLER_PATH |
A manifest project name is not a legal CMake identifier, so every character which is not a letter or a digit becomes an underscore. A component consumes the dependency through the variable and hardcodes no path:
spl_add_source(${MODULE_BRIGHTNESS_CONTROLLER_PATH}/export/brightness_controller.c)
Manifests
| File | Scope |
|---|---|
west.yaml |
Every variant |
variants/<VARIANT>/west.yaml |
That variant. Overrides the root manifest by project name |
An overlay can add a dependency and override one, but it cannot remove one. That follows from merging by project name. So keep the root manifest to what every variant needs.
Every dependency is installed under its revision, so two variants pinning one dependency at two revisions get two checkouts instead of fighting over one:
build/modules/brightness-controller/generated-code-v0.1.0/
build/modules/brightness-controller/generated-code-v0.5.0/
Workspace directory
The workspace directory is where west installs the dependencies. By default it
is build/modules below the project root. A relative path is resolved against
the project root. An absolute path is used as it is.
The first setting found wins:
| Setting | Example |
|---|---|
CMake variable SPL_WEST_DEPS_WORKSPACE_DIR |
set(SPL_WEST_DEPS_WORKSPACE_DIR modules) before the include(), or -DSPL_WEST_DEPS_WORKSPACE_DIR=D:/west |
Environment variable SPL_WEST_DEPS_WORKSPACE_DIR |
Set by the CI job |
| Default | build/modules |
To set it per variant, put the set() into variants/<VARIANT>/config.cmake,
as long as the project includes that file before this extension.
The command line option behind it is spl_west_deps generate --workspace-dir <dir>.
When the directory changes, the next CMake configuration installs the dependencies into the new directory. The old directory is left as it is.
A west workspace points to one manifest at a time. Each run points it to its own merged manifest just before it updates. So several configurations can share one workspace one after the other, but not at the same time: one of them could then update with the manifest of the other.
How it works
Unlike the other spl-core extensions, index.cmake does not
cmake_language(DEFER ...) its work to the end of the CMake configuration: the
dependency sources have to exist before the variant parts are processed. So the
file runs spl_west_deps generate ... while it is being included, then
include()s the generated ${CMAKE_BINARY_DIR}/spl_west_deps.cmake.
The generate command:
- Creates a pypeline
ExecutionContextfor the project. - Registers
variants/<VARIANT>/west.yamlin the context's data registry, when the variant has one. TheWestInstallstep merges the registered manifests after the project root manifest, which is what makes the variant override it. - Instantiates
WestInstallwithrevision_scoped_pathsand runs it through py-app-dev'sExecutor. The step is skipped while the manifests and the installed directories are unchanged, so a repeated CMake configuration costs nothing. - Reads the
ExternalProjectentries the step publishes and writes oneset(MODULE_<NAME>_PATH ...)per dependency.
Step 4 uses the step's update_execution_context(), which reads the step's
result file rather than its in-memory state. That is why the variables are
complete even on a run where the install was skipped.
Start developing
The project is managed with uv and orchestrated by pypeline. Bootstrap the environment and run the full pipeline (venv, pre-commit, tests) with:
pypeline run
Committing changes
This repository uses commitlint for checking if the commit message meets the conventional commit format. Commit messages drive the automated release.
Continuous integration & release
CI runs on GitHub Actions (.github/workflows/ci.yml): lint (pre-commit),
commitlint, a test matrix (Python 3.10/3.13 × Ubuntu/Windows), and a release job.
Releases are automated with python-semantic-release:
merging to main bumps the version from the conventional-commit history and
publishes to PyPI (trusted publishing) and GitHub Releases.
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
Metadata
Release files for spl-west-deps 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spl_west_deps-0.2.0.tar.gz | 7.6 kB | With provenance | Details for spl_west_deps-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spl_west_deps-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for spl_west_deps-0.2.0-py3-none-any.whl |
Total release size: 16.5 kB
Release files / spl_west_deps-0.2.0.tar.gz
| Download URL | spl_west_deps-0.2.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9277f9d24b32ccfb28ec759db18ea7baffcfbcd0f87dad6a87aa14abb9871306
|
|
BLAKE2b-256 checksum How to use checksums |
e1239cd6e754bd01048705923b669ec6dbc0acd9ec94e14436761952e4486acb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / spl_west_deps-0.2.0-py3-none-any.whl
| Download URL | spl_west_deps-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b3f24b8ea0e21cd80d26cd16c8d3f3d88e9066e12a35f1fbad6f366bfa4c82b
|
|
BLAKE2b-256 checksum How to use checksums |
d8320991e2044abf3b6eca7aba89f0def8e56cb36c3164442fefe0b295eb6b98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for spl-west-deps 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for spl_west_deps-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.