Repository navigation
Fix wheel build - #3182
Fix wheel build#3182
Conversation
Summary of ChangesHello @csukuangfj, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the reliability and compatibility of the wheel build process. It refines how build directories are determined within the CMake extension script, making path handling more robust. Additionally, it updates the wheel patching utility to include support for Python 3.14, ensuring broader compatibility for generated wheels. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR extends Python 3.14 support across multiple build workflows, upgrades cibuildwheel to v3.3.1, refactors cmake command construction to use safer explicit lists for path and directory handling, and adds cp314 wheel filename mapping for Python 3.14 detection. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request aims to fix the wheel build process. The changes include using resolved paths for build directories in cmake/cmake_extension.py to improve robustness, adding support for Python 3.14 in scripts/wheel/patch_wheel.py, and various code formatting improvements for better readability. The changes are generally good and contribute to fixing the build. I've added one comment regarding a long if/elif chain in scripts/wheel/patch_wheel.py which could be refactored for better maintainability as new Python versions are supported.
| elif "cp314" in str(whl): | ||
| py_version = "3.14" |
There was a problem hiding this comment.
While this change is correct, this long if/elif chain is becoming difficult to maintain. With each new Python version, another elif block is added. Consider refactoring this logic to be more scalable. For example, you could use a regular expression to extract the Python version from the wheel filename.
An example refactoring could look like this:
import re
# ...
match = re.search(r"cp3(\d+)", str(whl))
if match:
py_version = f"3.{match.group(1)}"
elif "py3-none" in str(whl):
py_version = None
else:
assert False, f"Unknown python version in {whl}"This would handle all cp3* versions automatically and make the code more robust for the future.
Fixes #3177
cc @ggolda
Summary by CodeRabbit
New Features
Chores