indygreg / python-build-standalone

Produce redistributable builds of Python
BSD 3-Clause "New" or "Revised" License
1.71k stars 107 forks source link

`sys.winver` is `3.1` instead of `3.11` #199

Closed ala-ableton closed 5 months ago

ala-ableton commented 7 months ago

I downloaded and extracted https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-i686-pc-windows-msvc-static-install_only.tar.gz, then ran python.exe -c "import sys; print(sys.winver)" and it printed 3.1, instead of the expected 3.11. This is because on https://github.com/indygreg/python-build-standalone/blob/main/cpython-windows/build.py#L1525, the Python version gets truncated to 3 characters.

indygreg commented 5 months ago

Thanks for the report!

ala-ableton commented 5 months ago

Thanks for fixing!