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

Proposing update_env_if construct to CM script meta #483

Open
arjunsuresh opened this issue Nov 5, 2024 Discussed in #482 · 0 comments
Open

Proposing update_env_if construct to CM script meta #483

arjunsuresh opened this issue Nov 5, 2024 Discussed in #482 · 0 comments
Labels
enhancement New feature or request

Comments

@arjunsuresh
Copy link
Contributor

Discussed in #482

Originally posted by arjunsuresh November 5, 2024
Currently CM script meta is not having an option to update env variables based on some conditions and these updates need to happen in customize.py. This works fine for small scripts but for generic scripts like get-generic-python-lib this increases the complexity of the code in customize.py.

Any deps can update a ENV variables - for example detect-cpu can set CPU_ARCHITECTURE as x86 and if get-generic-sys-util has selected a package say X we can update the installation source for X on x86 in _cm.yml itself if we can have the below construct.

update_env_if: {
  "env": {
  ....
  }
  "skip_if_env": {
  ....
  } 
}

Here, we can use skip_if_env, enable_if_env, skip_if_any_env and enable_if_any_env which we currently use to conditionally turn on dependencies.

@arjunsuresh arjunsuresh added the enhancement New feature or request label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant