Skip to content

Commit edf2f06

Browse files
committed
pip_hook.py: PIPLOADER_PATCHES_BASE_DIRS available only when --python.EnableDebuggingBuiltins is set
1 parent 623c761 commit edf2f06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graalpython/lib-graalpython/pip_hook.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ class PipLoader:
4444
def __init__(self, real_spec):
4545
self.real_spec = real_spec
4646
import os
47-
self._patches_base_dirs = [os.path.join(__graalpython__.core_home, "patches")] + \
48-
os.environ.get('PIPLOADER_PATCHES_BASE_DIRS', "").split(",")
47+
self._patches_base_dirs = [os.path.join(__graalpython__.core_home, "patches")]
48+
if hasattr(__graalpython__, "tdebug"):
49+
self._patches_base_dirs += os.environ.get('PIPLOADER_PATCHES_BASE_DIRS', "").split(",")
4950

5051
def create_module(self, spec):
5152
return self.real_spec.loader.create_module(self.real_spec)
@@ -122,7 +123,6 @@ def apply_first_existing(dir, suffix, wd=None):
122123
print("Looking for Graal Python patches for " + package_name)
123124

124125
for pbd in self._patches_base_dirs:
125-
print("... checking " + pbd)
126126
# patches intended for binary distribution:
127127
# we may need to change wd if we are actually patching the source distribution
128128
bdist_dir = os.path.join(pbd, package_name, "whl")

0 commit comments

Comments
 (0)