Skip to content

Commit 836c418

Browse files
committed
Change the default pycache prefix if running Bytecode DSL interpreter
1 parent e62dbbd commit 836c418

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/SysModuleBuiltins.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,9 @@ public void postInitialize0(Python3Core core) {
611611
}
612612
sys.setAttribute(tsLiteral("dont_write_bytecode"), context.getOption(PythonOptions.DontWriteBytecodeFlag));
613613
TruffleString pycachePrefix = context.getOption(PythonOptions.PyCachePrefix);
614+
if (pycachePrefix.isEmpty() && PythonOptions.ENABLE_BYTECODE_DSL_INTERPRETER) {
615+
pycachePrefix = PythonUtils.toTruffleStringUncached("__bci_dsl_pycache__");
616+
}
614617
sys.setAttribute(tsLiteral("pycache_prefix"), pycachePrefix.isEmpty() ? PNone.NONE : pycachePrefix);
615618
sys.setAttribute(tsLiteral("_stdlib_dir"), stdlibHome);
616619

0 commit comments

Comments
 (0)