Skip to content

Commit d8d4b8d

Browse files
committed
Use the cherry-picked 'full_version' helper
1 parent a128f01 commit d8d4b8d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

python/extensions/python.bzl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"Python toolchain module extensions for use with bzlmod"
1616

1717
load("//python:repositories.bzl", "python_register_toolchains")
18-
load("//python:versions.bzl", "MINOR_MAPPING")
1918
load("//python/extensions/private:pythons_hub.bzl", "hub_repo")
19+
load("//python/private:full_version.bzl", "full_version")
2020
load("//python/private:toolchains_repo.bzl", "multi_toolchain_aliases")
2121
load("//python/private:version_label.bzl", "version_label")
2222

@@ -76,10 +76,9 @@ def _python_impl(module_ctx):
7676
module_toolchain_versions = []
7777

7878
for toolchain_attr in mod.tags.toolchain:
79-
# TODO @aignas 2023-07-29: cherry-pick full_version helper
80-
toolchain_version = MINOR_MAPPING.get(toolchain_attr.python_version, toolchain_attr.python_version)
81-
toolchain_version_short = version_label(toolchain_version, sep = ".")
82-
toolchain_name = "python_" + version_label(toolchain_version_short, sep = "_")
79+
toolchain_version = full_version(toolchain_attr.python_version)
80+
toolchain_version_short, _, _ = toolchain_version.rpartition(".")
81+
toolchain_name = "python_" + version_label(toolchain_version, sep = "_")
8382

8483
# Duplicate versions within a module indicate a misconfigured module.
8584
if toolchain_version_short in module_toolchain_versions:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy