Skip to content

Commit e2e0b0c

Browse files
authored
Install Python headers in the ARM64 wheel-building container. (#21749)
This fixes a CI error due to our switch to Python 3.11.
1 parent 80b21b7 commit e2e0b0c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ jobs:
5757
with:
5858
repo-token: ${{ secrets.GITHUB_TOKEN }}
5959
version: 23.x
60+
- name: Install Python headers
61+
run: yum install -y python3.11-devel
6062
- env: {}
6163
name: Build wheels
6264
run: ./pants run src/python/pants_release/release.py -- build-wheels

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ jobs:
376376
with:
377377
repo-token: ${{ secrets.GITHUB_TOKEN }}
378378
version: 23.x
379+
- name: Install Python headers
380+
run: yum install -y python3.11-devel
379381
- env: {}
380382
name: Build wheels
381383
run: ./pants run src/python/pants_release/release.py -- build-wheels

src/python/pants_release/generate_github_workflows.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,13 @@ def install_go() -> Step:
366366
}
367367

368368

369+
def install_python_headers_in_manylinux_container() -> Step:
370+
return {
371+
"name": "Install Python headers",
372+
"run": "yum install -y python3.11-devel",
373+
}
374+
375+
369376
# NOTE: Any updates to the version of arduino/setup-protoc will require an audit of the updated source code to verify
370377
# nothing "bad" has been added to the action. (We pass the user's GitHub secret to the action in order to avoid the
371378
# default GitHub rate limits when downloading protoc._
@@ -879,7 +886,11 @@ def build_wheels_job(
879886
"steps": [
880887
*initial_steps,
881888
install_protoc(), # for prost crate
882-
*([] if platform == Platform.LINUX_ARM64 else [install_go()]),
889+
*(
890+
[install_python_headers_in_manylinux_container()]
891+
if platform == Platform.LINUX_ARM64
892+
else [install_go()]
893+
),
883894
{
884895
"name": "Build wheels",
885896
"run": "./pants run src/python/pants_release/release.py -- build-wheels",

0 commit comments

Comments
 (0)