Skip to content

Commit

Permalink
Prefer the host interpreter labels
Browse files Browse the repository at this point in the history
  • Loading branch information
jvolkman committed Jan 24, 2024
1 parent b410c69 commit 2d000ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pycross/private/bzlmod/pycross.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def _pycross_impl(module_ctx):

requested_version = interpreter_tag.registered_python_version
if requested_version:
repo_name = "python_{}".format(requested_version.replace(".", "_"))
repo_name = "python_{}_host".format(requested_version.replace(".", "_"))
if repo_name not in INTERPRETER_LABELS:
# Try the old style
repo_name = "python_{}".format(requested_version.replace(".", "_"))
if repo_name not in INTERPRETER_LABELS:
fail("Python version {} has not been registered".format(requested_version))
python_interpreter_target = INTERPRETER_LABELS[repo_name]
Expand Down

0 comments on commit 2d000ed

Please sign in to comment.