From 1a7798b115587540265bcbdede2dcd8d2485337d Mon Sep 17 00:00:00 2001 From: shadchin Date: Thu, 21 Dec 2023 22:07:34 +0300 Subject: [PATCH] Fix hack for setuptools on Windows --- library/python/runtime_py3/importer.pxi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/python/runtime_py3/importer.pxi b/library/python/runtime_py3/importer.pxi index 901c9faa3a..66ecd35167 100644 --- a/library/python/runtime_py3/importer.pxi +++ b/library/python/runtime_py3/importer.pxi @@ -221,7 +221,8 @@ class ResourceImporter(object): def find_spec(self, fullname, path=None, target=None): # Поддежка переопределения стандартного distutils из пакетом из setuptools if fullname.startswith("distutils."): - if path and len(path) > 0 and "/setuptools/_distutils" in path[0]: + setuptools_path = f"{path_sep}setuptools{path_sep}_distutils" + if path and len(path) > 0 and setuptools_path in path[0]: import importlib import importlib.abc