File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}"
You can’t perform that action at this time.
0 commit comments