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

Add a new configuration variable for setting default xbuildenv url #85

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

ryanking13
Copy link
Member

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 calls pyodide 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:

pyodide xbuildenv install --url http://example.com/xbuildenv/dev/xbuildenv.tar.bz2

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.

Comment on lines 16 to 20
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.
Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

@hoodmane hoodmane left a 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.

ryanking13 added a commit that referenced this pull request Jan 24, 2025
…ager` (#91)

Splitted out from #85 to reduce diff.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@ryanking13
Copy link
Member Author

Thanks for the review!

@ryanking13 ryanking13 merged commit 380102a into pyodide:main Jan 24, 2025
4 checks passed
@ryanking13 ryanking13 deleted the default-xbuildenv-url branch January 24, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants