Skip to content

Commit

Permalink
Install Python headers in the ARM64 wheel-building container. (#21749)
Browse files Browse the repository at this point in the history
This fixes a CI error due to our switch to Python 3.11.
  • Loading branch information
benjyw authored Dec 12, 2024
1 parent 80b21b7 commit e2e0b0c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Install Python headers
run: yum install -y python3.11-devel
- env: {}
name: Build wheels
run: ./pants run src/python/pants_release/release.py -- build-wheels
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Install Python headers
run: yum install -y python3.11-devel
- env: {}
name: Build wheels
run: ./pants run src/python/pants_release/release.py -- build-wheels
Expand Down
13 changes: 12 additions & 1 deletion src/python/pants_release/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@ def install_go() -> Step:
}


def install_python_headers_in_manylinux_container() -> Step:
return {
"name": "Install Python headers",
"run": "yum install -y python3.11-devel",
}


# NOTE: Any updates to the version of arduino/setup-protoc will require an audit of the updated source code to verify
# nothing "bad" has been added to the action. (We pass the user's GitHub secret to the action in order to avoid the
# default GitHub rate limits when downloading protoc._
Expand Down Expand Up @@ -879,7 +886,11 @@ def build_wheels_job(
"steps": [
*initial_steps,
install_protoc(), # for prost crate
*([] if platform == Platform.LINUX_ARM64 else [install_go()]),
*(
[install_python_headers_in_manylinux_container()]
if platform == Platform.LINUX_ARM64
else [install_go()]
),
{
"name": "Build wheels",
"run": "./pants run src/python/pants_release/release.py -- build-wheels",
Expand Down

0 comments on commit e2e0b0c

Please sign in to comment.