Fix python header resolution on Windows (#26693)

The substring "\U" in the path to the Python binary was confused for a unicode escape sequence. This should be a raw string.
pull/26711/head
Anthony Bellissimo 4 years ago committed by GitHub
parent 93d95dec97
commit 3545d8e74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      third_party/py/python_configure.bzl

@ -256,7 +256,7 @@ def _get_python_include(repository_ctx, python_bin):
python_bin,
"-c",
"import os;" +
"main_header = os.path.join('{}', 'Python.h');".format(include_path) +
"main_header = os.path.join(r'{}', 'Python.h');".format(include_path) +
"assert os.path.exists(main_header), main_header + ' does not exist.'",
],
error_msg = "Unable to find Python headers for {}".format(python_bin),

Loading…
Cancel
Save