Build fixes and enhancements#63
Conversation
👋 Hello jakub-kocka, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
1f4bbeb to
9b91cdf
Compare
There was a problem hiding this comment.
Pull request overview
Updates the wheel build/test pipeline to avoid known incompatible dependencies, improve resilience to corrupt wheel artifacts, and stabilize dependency resolution during wheel builds.
Changes:
- Extend exclude/marker handling (notably platform ∩ python exclusion without a version) and add new exclude entries.
- Detect and discard corrupt/non-zip “.whl” artifacts during repair and install verification steps.
- Add esptool dependencies into the assembled requirements and introduce a
--force-interpreter-binarybuild mode for dependent wheels.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
exclude_list.yaml |
Adds new exclusions (pydantic_core on Win/macOS + py3.14; idf-component-manager 3.0.0 on older Pythons). |
yaml_list_adapter.py |
Adds intersection-style exclude marker generation for platform+python (no version) and refactors python marker fragment building. |
test_build_wheels.py |
Adds unit tests covering the new platform∩python intersection exclude behavior. |
test_wheels_install.py |
Adds preflight zip validation + pip error classification to discard corrupt wheel artifacts. |
repair_wheels.py |
Adds zip validation before repair and validates repaired output; deletes invalid artifacts. |
build_wheels.py |
Adds tomllib/tomli parsing and appends esptool pyproject.toml dependencies to assembled requirements. |
build_requirements.txt |
Adds tomli for Python < 3.11 to support TOML parsing fallback. |
build_wheels_from_file.py |
Adds --force-interpreter-binary support and per-requirement --no-binary injection (non-Windows). |
_helper_functions.py |
Makes print_color safer on non-UTF8 Windows consoles by sanitizing output text. |
.github/workflows/unit-tests.yml |
Switches unit-test dependency install to -r build_requirements.txt. |
.github/workflows/build-wheels-python-dependent.yml |
Enables --force-interpreter-binary, sets PYO3_USE_ABI3_FORWARD_COMPATIBILITY, and adds an ARMv7 artifact permission fix. |
.github/workflows/build-wheels-platforms.yml |
Adds an ARMv7 artifact permission fix before upload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
620715a to
1fda564
Compare
59f7ab7 to
d023d68
Compare
peterdragun
left a comment
There was a problem hiding this comment.
There is a typo in one of the commit messages PYthon -> Python.
This MR has a lot of commits which does not seem to be related. Please try to avoid making such big MRs with unrelated changes; it is harder to review and easier to miss some important details.
There are two commits that try to address seemingly the same issue - BadZipFile - why are those two separate commits? Would it make sense to merge into one?
The last commit message is also quite vague and addresses some issues that were introduced in earlier commits in this MR. Try to keep the commits clean and MRs as simple as possible.
Thank you, Peter. I will try to polish this. Actually, it started as a component manager constraint fix, and with the tests, issues started to pop up - I have changed the name of the PR and will reorder it as well as possible ... you are right, that the esptool requirements addition could be in a different PR tho |
…n macOS - Add idf-component-manager to exclude_list for unsupported Python versions - Correct platform+python intersection handling in YAMLListAdapter - Exclude dbus-python for Python 3.11 on macOS
- Fetch esptool dependencies when assembling requirements - Align cPython / workflow builds with interpreter environments - Fix permissions for root and non-root CI runners
- Detect and handle invalid or corrupt wheels (BadZip / PEP 427) - Dedupe wheel paths; tolerate missing files when pruning bad zips - Keep wheels when auditwheel reports InvalidLibc on Linux ARMv7 - Refinements from review Made-with: Cursor
9706f42 to
4ea168c
Compare
|
@peterdragun, I have updated the commit history and added the PyPI check as you suggested for the package metadata of supported Pythons before the build. Hope it is cleaner now, I am sorry for the accidentally grown in size PR - the main reason was to have successful builds (which was not exactly true by letting some issues go to other PR) 🙏 |
4ea168c to
2d80b1e
Compare
peterdragun
left a comment
There was a problem hiding this comment.
LGTM, my understanding of this repo is quite limited, but as far as I can tell, this seems correct. Thank you for applying my suggestions.
Skip pip wheel for exact == pins when PyPI metadata Requires-Python excludes the current interpreter (build_wheels and build_wheels_from_file). Add helpers, tests, and SKIP_PYPI_REQUIRES_PYTHON_CHECK escape hatch. Remove redundant exclude_list row for idf-component-manager==3.0.0; covered by the preflight for that release (Requires-Python >=3.10,<4). Made-with: Cursor
2d80b1e to
233fcbd
Compare
|
Thank you for the review. Since the builds still succeed, I am merging this to have working builds for scheduled runs. |
idf-component-manager v3.0.0 does not support Python <= 3.10 https://pypi.org/project/idf-component-manager/3.0.0/ adding to the
exclude_list.yamlbecause of some dependency has propagatedDescription
Because of the failing wheels built due to the idf-component-manager, the package was added to
exclude_list.yaml.idf-component-manager v3.0.0 does not support Python <= 3.10 - https://pypi.org/project/idf-component-manager/3.0.0/
Also, during the test builds an issue about broken wheels has pop up - fixed the BadZipFile / "Bad magic number" errors - PEP 427 (https://github.com/espressif/idf-python-wheels/actions/runs/23427493077/job/68191831315)
As part of this PR, the esptool dependencies are added into the requirements assembly - the packages that will be built
This step is mostly for the esptool master builds when using an extra index, because even if the package itself is excluded, its dependencies are downloaded with the package as well, and later on the desired ones are discarded
The PyPI package Python version test before build has been implemented as a new feature
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: