Repository navigation
Rebuild cryptography 50+ on Intel Mac when find-links is stale - #71
Conversation
👋 Hello jakub-kocka, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Pull request overview
This PR fixes macOS Intel (macos_x86_64) handling for cryptography 49+ so that wheel builds are not incorrectly skipped when --find-links contains an older or wrong-platform cryptography wheel; instead, the pipeline rebuilds from sdist using the OpenSSL 4 path to ensure the expected artifacts are produced and published.
Changes:
- Add helper logic to detect when
find-linksis stale for macOS Intelcryptographyand force a rebuild rather than skipping. - Wire the rebuild logic into both
build_wheels.pyandbuild_wheels_from_file.py. - Add unit tests covering rebuild vs skip decisions, plus update docs and the local spike script.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
_helper_functions.py |
Adds macOS Intel cryptography “rebuild instead of skip” decision logic based on PyPI latest matching release vs local macOS x86_64 wheels in find-links. |
build_wheels.py |
Uses the new helper to rebuild cryptography on macOS Intel when find-links would otherwise cause a skip. |
build_wheels_from_file.py |
Applies the same rebuild-vs-skip logic for requirements processed from a file. |
test_build_wheels.py |
Adds tests for the macOS Intel rebuild decision under stale/mismatched find-links scenarios. |
test_build_wheels_from_file.py |
Adds a test ensuring macOS Intel does not skip when find-links is stale for cryptography. |
scripts/spike_cryptography_macos_intel_openssl4.sh |
Updates the spike build command to allow cryptography>=49 (unbounded). |
README.md |
Documents the new behavior: find-links should not prevent macOS Intel cryptography rebuilds when newer matching releases exist on PyPI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dobairoland
left a comment
There was a problem hiding this comment.
It would be better to have these in config files instead of code hacks. But if it works then let us go with this for now.
1c32ead to
a6e3dc1
Compare
|
@dobairoland, thank you for the review. I believe this does not need to be that "universal" in config files - since we are basically taking care of supporting the whole cryptography build pipeline for Intel Mac when it was officially abandoned. Mainly for the esptool, but I believe it might come in handy. |
peterdragun
left a comment
There was a problem hiding this comment.
LGTM. This seems to have fixed the pipeline; see: https://github.com/espressif/esptool/actions/runs/33368240247/job/99460897081
Thank you!
|
Thank you, guys, for the review and verification. I am merging this. |
Description
The
cryptographypackage > 49.0.0 was not correctly handled to trigger the complete build with the OpenSSL bundling/linking process, so this produced that it was not available on Espressif's PyPI. Then theesptool(since it is not officially supported on Intel Mac) tried to build the package from the sdist, which failed since the esptool's pipeline is not ready for this.This fix should correctly build and upload the
cryptography49+ packages for the esptool.It would be good to follow up on this PR with an
esptoolsPR that will force thecryptography--only-binaryflag ... I believe esptool's pipeline is not ready for any of the platform and architecturecryptographypackage building, so it should not be hard, since we won't need to distinguish between them and do it for all of them.Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: