SERVER-117739 fix pycache from gdb (#46911)
GitOrigin-RevId: ba3f42c2af3ab1611e9d01e8b753810c545a0fd4
This commit is contained in:
committed by
MongoDB Bot
parent
fa4bd49a8c
commit
ce1c611f9e
@@ -1,6 +1,6 @@
|
||||
"""Repository rules for rules_py_simple"""
|
||||
|
||||
load("//bazel:utils.bzl", "retry_download_and_extract")
|
||||
load("//bazel:utils.bzl", "retry_download_and_extract", "write_python_pyc_cache_prefix_customization")
|
||||
load("//bazel/platforms:normalize.bzl", "ARCH_TO_PLATFORM_MAP", "OS_TO_PLATFORM_MAP")
|
||||
|
||||
URLS_MAP = {
|
||||
@@ -169,15 +169,7 @@ toolchain(
|
||||
|
||||
usercustomize_file = "dist/lib/python" + python_major_version + "." + python_minor_version + "/site-packages/usercustomize.py"
|
||||
|
||||
ctx.file(
|
||||
usercustomize_file,
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
sys.pycache_prefix = os.path.join(tempfile.gettempdir(), "bazel_pycache")
|
||||
""",
|
||||
)
|
||||
write_python_pyc_cache_prefix_customization(ctx, usercustomize_file)
|
||||
|
||||
ctx.report_progress("generating build file")
|
||||
os_constraint = OS_TO_PLATFORM_MAP[os]
|
||||
|
||||
Reference in New Issue
Block a user