Skip to content

Commit d43f922

Browse files
committed
Fix Pyston tags
This was discovered by #16074 I'm not sure what the exact schema of the cache tag is, but since the project is dead, I don't expect any new non-matching versions to follow.
1 parent 2f553bf commit d43f922

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

crates/uv-python/python/get_interpreter_info.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ def format_full_version(info):
4646
r"\1.\2",
4747
sys.implementation.cache_tag,
4848
)
49+
elif implementation_name == "pyston":
50+
# Pyston reports the CPython version as sys.implementation.version,
51+
# so we need to discover the Pyston version from the cache_tag
52+
import re
53+
54+
implementation_version = re.sub(
55+
r"pyston-(\d)(\d+)",
56+
r"\1.\2",
57+
sys.implementation.cache_tag,
58+
)
4959
else:
5060
implementation_version = format_full_version(sys.implementation.version)
5161
else:

0 commit comments

Comments
 (0)