File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,12 +221,9 @@ def is_python_build(check_home=None):
221221 import warnings
222222 warnings .warn ("check_home argument is deprecated and ignored." ,
223223 DeprecationWarning , stacklevel = 2 )
224- for fn in ("Setup" , "Setup.local" ):
225- if os .path .isfile (os .path .join (_PROJECT_BASE , "Modules" , fn )):
226- return True
227- return False
224+ return sys ._is_python_build
228225
229- _PYTHON_BUILD = is_python_build ()
226+ _PYTHON_BUILD = sys . _is_python_build
230227
231228if _PYTHON_BUILD :
232229 for scheme in ('posix_prefix' , 'posix_home' ):
Original file line number Diff line number Diff line change @@ -3304,6 +3304,9 @@ _PySys_UpdateConfig(PyThreadState *tstate)
33043304 SET_SYS_FROM_WSTR(SYS_ATTR, WSTR); \
33053305 }
33063306
3307+ #define COPY_BOOL (KEY , VALUE ) \
3308+ SET_SYS(KEY, PyBool_FromLong(VALUE));
3309+
33073310 if (config -> module_search_paths_set ) {
33083311 COPY_LIST ("path" , config -> module_search_paths );
33093312 }
@@ -3315,6 +3318,7 @@ _PySys_UpdateConfig(PyThreadState *tstate)
33153318 COPY_WSTR ("exec_prefix" , config -> exec_prefix );
33163319 COPY_WSTR ("base_exec_prefix" , config -> base_exec_prefix );
33173320 COPY_WSTR ("platlibdir" , config -> platlibdir );
3321+ COPY_BOOL ("_is_python_build" , config -> _is_python_build );
33183322
33193323 if (config -> pycache_prefix != NULL ) {
33203324 SET_SYS_FROM_WSTR ("pycache_prefix" , config -> pycache_prefix );
You can’t perform that action at this time.
0 commit comments