From 0177e3d69817fc0b303cb751b6c54a2d5bbb7407 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 f9db9e1..3b6e2e7 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("_PYPROJECT_HOOKS_BACKEND_PATH") ep = os.environ["_PYPROJECT_HOOKS_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))