Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

venv: Add support for virtual environment specs #736

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions src/west/manifest-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,78 @@ mapping:
required: true
type: str

# The venv key specifies requirements for the build environment for Zephyr
Copy link
Collaborator

@marc-hb marc-hb Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in this repo is supposed to be not specific to Zephyr. Is this PR Zephyr-specific? I don't have time for a full review sorry.

If it is Zephyr-specific, then it belongs to https://github.com/zephyrproject-rtos/zephyr/tree/main/scripts/west_commands

Considering west build is Zephyr-specific, I suspect this PR is too.

Even if it's not Zephyr-specific, https://github.com/zephyrproject-rtos/zephyr/tree/main/scripts/west_commands could be a good "staging" area to gather feedback, real-use and... more reviewers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not Zephyr specific but will be used in a Zephyr west command. The goal of this change is to add metadata about a project's requirements (both python and binary).

# West will handle merging any definitions into your binary dependency
# strings where allowed.
# Example:
#
# urls:
# "windows-*":
# url: "https://my.download.server/win/${arch}.zip"
#
# The above will match any architecture for the windows OS and generate a url
# replacing ${arch} with the current machine's underlying architecture. West
# will automatically provide a few definitions:
# - os: The current OS (one of 'windows', 'linux', or 'mac')
# - arch: The current architecture. This value is standardized such that
# x86_64 is represented as amd64 and aarch64 as arm64. All others match
# Python's `platform.machine()`
# - platform: A concatenation of ${os}-${arch}
venv:
required: false
type: map
mapping:
definitions:
required: false
type: map
mapping:
regex;(.*):
type: str
name:
required: false
type: str
bin-requirements:
required: false
type: map
mapping:
regex;(.*):
type: map
mapping:
definitions:
required: false
type: map
mapping:
regex;(.*):
type: str
urls:
required: true
type: map
mapping:
regex;(.*):
type: map
mapping:
url:
required: true
type: str
paths:
required: false
type: seq
sequence:
- type: str
py-requirements:
required: false
type: seq
sequence:
- type: map
mapping:
pattern:
required: true
type: str
type:
required: true
type: str
enum: ['directory', 'constraints', 'package', 'requirements']

# The "projects" key specifies a sequence of "projects", each of which has a
# remote, and may specify additional configuration.
#
Expand Down
Loading
Loading