Skip to content

fix: apply base constraints to build env #2544

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Aug 5, 2025

This hopefully will help with failures like #2542 and main. Currently, we lose all constraints, even our base ones, when there's custom constraints. This adds any required constraints used to generate the constraint file to the constraints always.

@henryiii henryiii force-pushed the henryiii/fix/pyodidebase branch from 6fdea59 to 13cdb30 Compare August 5, 2025 21:09
@henryiii henryiii requested a review from Copilot August 8, 2025 20:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes constraint handling in the build environment to prevent losing base constraints when custom constraints are specified. It addresses failures like #2542 by ensuring base constraints are always applied alongside custom ones.

  • Changes constraint file generation to use persistent .in files instead of temporary files
  • Adds logic to merge custom constraints with base constraints from .in files
  • Creates new constraint input files for Pyodide Python versions 3.12 and 3.13

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
noxfile.py Updates constraint generation to write to persistent .in files instead of temporary files
cibuildwheel/util/resources.py Adds CONSTRAINTS_IN constant for the base constraints input file
cibuildwheel/util/packaging.py Implements logic to merge custom constraints with base constraints from .in files
cibuildwheel/resources/constraints-pyodide313.in New constraint input file for Python 3.13 Pyodide builds
cibuildwheel/resources/constraints-pyodide312.in New constraint input file for Python 3.12 Pyodide builds
Comments suppressed due to low confidence (2)

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.

1 participant