-
Notifications
You must be signed in to change notification settings - Fork 11
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
Do not require downloading xbuildenv when updating package recipes #30
Do not require downloading xbuildenv when updating package recipes #30
Conversation
Co-Authored-By: Gyeongjae Choi <def6488@gmail.com>
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! I left some minor comments, otherwise looks good to me.
pyodide_build/xbuildenv.py
Outdated
@@ -250,7 +250,7 @@ def _download(self, url: str, path: Path) -> None: | |||
Path to extract the cross-build environment to. | |||
If the path already exists, raise an error. | |||
""" | |||
logger.info("Downloading Pyodide cross-build environment from %s", url) | |||
logger.info(f"Downloading Pyodide cross-build environment from {url}") |
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.
I recently learned that it is not recommended not to use f-strings in log calls (pyodide/micropip#131).
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 for the pointer! I'll keep that in mind and add a Ruff rule for this in another 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.
Addressed in de4e3d7.
Co-Authored-By: Gyeongjae Choi <def6488@gmail.com>
Co-Authored-By: Gyeongjae Choi <def6488@gmail.com>
## Description Thanks to the tip in #30 (comment), I enabled a Ruff rule to avoid using f-strings in future logging statements we add: https://docs.astral.sh/ruff/rules/logging-f-string/, and converted the previous ones to comply with the rule. It's not necessarily required, but it's good to enable best practices. > [!IMPORTANT] > This PR should be merged with a merge commit, not squashed.
Description
Closes #25. This PR improves the xbuildenv search logic to not require downloads of the xbuildenv if a package update fails (for any reason). This means that the Pyodide root is searched in the current directory, and if it doesn't exist, we simply assume that the current working directory is the Pyodide root (and the
packages/
directory one level down hosts the recipes).I confirmed that this does not currently cause issues with the existing setup in the Pyodide repository.