Skip to content

Commit f13229b

Browse files
Matt-Hurdcopybara-github
authored andcommitted
Change PROFILER_PYTHON_VERSION to HERMETIC_PYTHON_VERSION.
This gets used by XLA to use the correct Python version PiperOrigin-RevId: 795246009
1 parent d5d5f2d commit f13229b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ load("//:config.bzl", "repository_configuration")
55

66
repository_configuration(name = "repository_configuration")
77

8-
load("@repository_configuration//:repository_config.bzl", "PROFILER_PYTHON_VERSION", "PROFILER_REQUIREMENTS_FILE")
8+
load("@repository_configuration//:repository_config.bzl", "HERMETIC_PYTHON_VERSION", "PROFILER_REQUIREMENTS_FILE")
99

10-
print("Using Python Version = {}".format(PROFILER_PYTHON_VERSION))
10+
print("Using Python Version = {}".format(HERMETIC_PYTHON_VERSION))
1111

1212
# XLA uses an old (2019) version of rules_closure, while Tensorboard requires a newer (2024) version.
1313
# rules_closure has added a number of other dependencies, which we disable so that XLA can properly initialize.
@@ -57,7 +57,7 @@ python_init_rules()
5757
load("@xla//third_party/py:python_init_repositories.bzl", "python_init_repositories")
5858

5959
python_init_repositories(
60-
default_python_version = PROFILER_PYTHON_VERSION,
60+
default_python_version = HERMETIC_PYTHON_VERSION,
6161
requirements = {
6262
"3.9": "//:requirements_lock_3_9.txt",
6363
"3.10": "//:requirements_lock_3_10.txt",

config.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"""Configuration for the xprof repository."""
22

33
def _repository_configuration(repository_ctx):
4-
python_version = repository_ctx.os.environ.get("PROFILER_PYTHON_VERSION", "3.11")
4+
python_version = repository_ctx.os.environ.get("HERMETIC_PYTHON_VERSION", "3.11")
55
repository_ctx.file("BUILD")
66
requirements_file = "//:requirements_lock_{version}.txt".format(version = python_version.replace(".", "_"))
77
repository_ctx.file("repository_config.bzl", content = """
8-
PROFILER_PYTHON_VERSION={python_version}
8+
HERMETIC_PYTHON_VERSION={python_version}
99
PROFILER_REQUIREMENTS_FILE={requirements_file}
1010
""".format(python_version = repr(python_version), requirements_file = repr(requirements_file)))
1111

1212
repository_configuration = repository_rule(
1313
implementation = _repository_configuration,
14-
environ = ["PROFILER_PYTHON_VERSION"],
14+
environ = ["HERMETIC_PYTHON_VERSION"],
1515
)

0 commit comments

Comments
 (0)