-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add a new configuration variable for setting default xbuildenv url #85
Conversation
pyodide_build/config.py
Outdated
class ConfigManager: | ||
""" | ||
Configuration manager for pyodide-build. | ||
This class works "before" installing the cross build environment. | ||
So it does not have access to the variables that are retrieved from the cross build environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new config variable needs to be accessed before downloading the cross-build env, so I subclassed the ConfigManager
into ConfigManager
and CrossBuildEnvConfigManager
. The former can be used even before installing the cross build env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we separate splitting these into its own PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Sounds reasonable. Let me split the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ryanking13. I think everything makes sense and it's a nice feature. I would be nice to split the config as a separate PR since that part of the diff is quite noisy.
Thanks for the review! |
This PR adds a new config variable:
default_cross_build_env_url.
This variable is used to set the default xbuildenv URL, which will be downloaded when a user calls
pyodide xbuildenv install
without passing the version, or when a user callspyodide build
without explicitly installing the xbuildenv.When is this variable useful?
For now, building packages using the nightly cross-build env, we need to explicitly install it from URL:
For instance, in pyodide-recipes repository, this is set in CI script.
However, I would like to put this value in the
pyproject.toml
, which, I think is more appropriate place to put build-related variables.