Tested on 3.12.10 and 3.11.0 - build suceeds, but there are some AttributeError: module 'sys' has no attribute 'winver' errors during installation (I assume when Python itself is executed to launch some commands / do tests) and running any commands to already installed Python fails with the same error.
Python runtime state: initialized
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1176, in exec_module
File "<frozen site>", line 636, in <module>
File "<frozen site>", line 622, in main
File "<frozen site>", line 361, in addusersitepackages
File "<frozen site>", line 348, in getusersitepackages
File "<frozen site>", line 313, in _get_path
AttributeError: module 'sys' has no attribute 'winver'
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/Lib/Tools/scripts/run_tests.py
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/bin/venvlauncher.exe
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/bin/venvwlauncher.exe
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/bin/pylauncher.exe
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/bin/pywlauncher.exe
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/Lib/lib-dynload
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/share/python312/PythonTargets.cmake
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/share/python312/PythonTargets-release.cmake
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/share/python312/PythonConfig.cmake
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/share/python312/PythonConfigVersion.cmake
-- Installing: D:/a/artifact-test-repo/artifact-test-repo/python-cmake-buildsystem/build/install/Lib/LICENSE.txt
DEBUG: 16+ >>>> ./install/bin/python.exe --version
Python 3.12.10
DEBUG: 17+ >>>> ./install/bin/python.exe -c "print(42)"
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1176, in exec_module
File "<frozen site>", line 636, in <module>
File "<frozen site>", line 622, in main
File "<frozen site>", line 361, in addusersitepackages
File "<frozen site>", line 348, in getusersitepackages
File "<frozen site>", line 313, in _get_path
AttributeError: module 'sys' has no attribute 'winver'
Tested on 3.12.10 and 3.11.0 - build suceeds, but there are some AttributeError: module 'sys' has no attribute 'winver' errors during installation (I assume when Python itself is executed to launch some commands / do tests) and running any commands to already installed Python fails with the same error.
Below is .yml for github action to reproduce the problem:
Here are example logs - https://github.com/Andrej730/artifact-test-repo/actions/runs/19988079925/job/57324841696