Remove the mention to distutils.
Thanks to jeongukjae@ from https://github.com/pybind/pybind11_bazel/pull/38/files
diff --git a/python_configure.bzl b/python_configure.bzl
index 8241368..ff63e8a 100644
--- a/python_configure.bzl
+++ b/python_configure.bzl
@@ -213,8 +213,8 @@
"try:\n" +
" library_paths = site.getsitepackages()\n" +
"except AttributeError:\n" +
- " from distutils.sysconfig import get_python_lib\n" +
- " library_paths = [get_python_lib()]\n" +
+ " from sysconfig import get_path\n" +
+ " library_paths = [get_path('purelib')]\n" +
"all_paths = set(python_paths + library_paths)\n" +
"paths = []\n" +
"for path in all_paths:\n" +
@@ -255,8 +255,7 @@
],
error_msg = "Problem getting python include path for Python version " + str(version),
error_details = ("Is the Python binary path set up right? " +
- "(See ./configure or " + _PYTHON_BIN_PATH + ".) " +
- "Is distutils installed?"),
+ "(See ./configure or " + _PYTHON_BIN_PATH + ".)"),
)
return result.stdout.splitlines()[0]