Skip to content

Commit 99abfbb

Browse files
committed
updating ci
1 parent ddb7811 commit 99abfbb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,22 @@ jobs:
9494
sudo rm -rf "${pythonLocation}/include/${py_abi}"
9595
sudo mkdir -p "${pythonLocation}/include/${py_abi}"
9696
sudo cp -a "/usr/include/${py_abi}/." "${pythonLocation}/include/${py_abi}/"
97+
includepy="$(python - <<'PY'
98+
import sysconfig
99+
print(sysconfig.get_config_var("INCLUDEPY"))
100+
PY
101+
)"
102+
# upb's system_python repository rule shells out to `python3` and
103+
# uses sysconfig.get_config_var("INCLUDEPY"), which under
104+
# actions/setup-python inside this container points at
105+
# /opt/hostedtoolcache/... rather than ${pythonLocation}. Materialize
106+
# that INCLUDEPY path too so Bazel's @system_python repo can symlink
107+
# real headers into external/system_python/python.
108+
sudo mkdir -p "$(dirname "${includepy}")"
109+
sudo rm -rf "${includepy}"
110+
sudo cp -a "${pythonLocation}/include/${py_abi}" "${includepy}"
97111
test -f "${pythonLocation}/include/${py_abi}/Python.h"
112+
test -f "${includepy}/Python.h"
98113
- name: 'Debug Python toolchain'
99114
run: |
100115
py_abi="python${{ matrix.python_version }}"

0 commit comments

Comments
 (0)