Commit 7a44134
committed
_bootstrap_python: Fix execution on windows disabling site import
This workaround the lack of `sys.winver` attribute addressing the following
error:
```
Generating C:/path/to/Python-3.11.12/Python/deepfreeze/deepfreeze.c
CUSTOMBUILD : Fatal Python error : init_import_site: Failed to import the site module [C:\path\to\pycbs-3.11-build\CMakeBuild\libpython\libpython-shared.vcxproj]
Python runtime state: initialized
Traceback (most recent call last):
File "C:\path\to\pycbs-3.11-build\Lib\site.py", line 626, in <module>
main()
File "C:\path\to\pycbs-3.11-build\Lib\site.py", line 612, in main
known_paths = addusersitepackages(known_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\path\to\pycbs-3.11-build\Lib\site.py", line 350, in addusersitepackages
user_site = getusersitepackages()
^^^^^^^^^^^^^^^^^^^^^
File "C:\path\to\pycbs-3.11-build\Lib\site.py", line 337, in getusersitepackages
USER_SITE = _get_path(userbase)
^^^^^^^^^^^^^^^^^^^
File "C:\path\to\pycbs-3.11-build\Lib\site.py", line 302, in _get_path
ver_nodot = sys.winver.replace('.', '')
^^^^^^^^^^
AttributeError: module 'sys' has no attribute 'winver'
```1 parent 0fb18b0 commit 7a44134
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