Commit ca2fd1a
committed
_bootstrap_python: Fix execution on windows disabling site import
This works around the lack of `sys.winver` attribute addressing the following
error:
```
Generating C:/path/to/Python-3.12.10/Python/deepfreeze/deepfreeze.c
CUSTOMBUILD : Fatal Python error : init_import_site: Failed to import the site module [C:\path o\pycbs-3.12-build\CMakeBuild\libpython\libpython-shared.vcxproj]
Python runtime state: initialized
Traceback (most recent call last):
File "C:\path o\pycbs-3.12-build\Lib\site.py", line 636, in <module>
main()
File "C:\path o\pycbs-3.12-build\Lib\site.py", line 622, in main
known_paths = addusersitepackages(known_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\path o\pycbs-3.12-build\Lib\site.py", line 361, in addusersitepackages
user_site = getusersitepackages()
^^^^^^^^^^^^^^^^^^^^^
File "C:\path o\pycbs-3.12-build\Lib\site.py", line 348, in getusersitepackages
USER_SITE = _get_path(userbase)
^^^^^^^^^^^^^^^^^^^
File "C:\path o\pycbs-3.12-build\Lib\site.py", line 313, in _get_path
ver_nodot = sys.winver.replace('.', '')
^^^^^^^^^^
AttributeError: module 'sys' has no attribute 'winver'
```1 parent 0fb18b0 commit ca2fd1a
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
0 commit comments