From 4224f9b2bc0dfc666daf516aa9cb58aa2b3b339f Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 24 Feb 2023 10:14:01 +0000 Subject: [PATCH] Replace comment with a more appropriate description --- src/pyproject_hooks/_in_process/_in_process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyproject_hooks/_in_process/_in_process.py b/src/pyproject_hooks/_in_process/_in_process.py index 778631d..99af56b 100644 --- a/src/pyproject_hooks/_in_process/_in_process.py +++ b/src/pyproject_hooks/_in_process/_in_process.py @@ -57,12 +57,12 @@ def __init__(self, hook_name=None): def _build_backend(): """Find and load the build backend""" - # Add in-tree backend directories to the front of sys.path. backend_path = os.environ.get("PEP517_BACKEND_PATH") ep = os.environ["PEP517_BUILD_BACKEND"] mod_path, _, obj_path = ep.partition(":") if backend_path: + # Ensure in-tree backend directories have the highest priority when importing. extra_pathitems = backend_path.split(os.pathsep) sys.meta_path.insert(0, _BackendPathFinder(extra_pathitems, mod_path))