| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | #ifndef Py_INTERNAL_PATHCONFIG_H
 | 
					
						
							|  |  |  | #define Py_INTERNAL_PATHCONFIG_H
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 23:02:26 +02:00
										 |  |  | #ifndef Py_BUILD_CORE
 | 
					
						
							|  |  |  | #  error "this header requires Py_BUILD_CORE define"
 | 
					
						
							| 
									
										
										
										
											2018-11-06 15:59:52 +01:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | typedef struct _PyPathConfig { | 
					
						
							|  |  |  |     /* Full path to the Python program */ | 
					
						
							|  |  |  |     wchar_t *program_full_path; | 
					
						
							|  |  |  |     wchar_t *prefix; | 
					
						
							| 
									
										
										
										
											2018-11-17 20:41:48 -08:00
										 |  |  |     wchar_t *exec_prefix; | 
					
						
							| 
									
										
										
										
											2019-09-21 01:02:56 +02:00
										 |  |  |     /* Set by Py_SetPath(), or computed by _PyConfig_InitPathConfig() */ | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  |     wchar_t *module_search_path; | 
					
						
							|  |  |  |     /* Python program name */ | 
					
						
							|  |  |  |     wchar_t *program_name; | 
					
						
							|  |  |  |     /* Set by Py_SetPythonHome() or PYTHONHOME environment variable */ | 
					
						
							|  |  |  |     wchar_t *home; | 
					
						
							| 
									
										
										
										
											2019-09-26 02:22:35 +02:00
										 |  |  | #ifdef MS_WINDOWS
 | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  |     /* isolated and site_import are used to set Py_IsolatedFlag and
 | 
					
						
							|  |  |  |        Py_NoSiteFlag flags on Windows in read_pth_file(). These fields | 
					
						
							|  |  |  |        are ignored when their value are equal to -1 (unset). */ | 
					
						
							|  |  |  |     int isolated; | 
					
						
							|  |  |  |     int site_import; | 
					
						
							| 
									
										
										
										
											2019-06-29 10:34:11 -07:00
										 |  |  |     /* Set when a venv is detected */ | 
					
						
							|  |  |  |     wchar_t *base_executable; | 
					
						
							| 
									
										
										
										
											2019-09-26 02:22:35 +02:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | } _PyPathConfig; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-26 02:22:35 +02:00
										 |  |  | #ifdef MS_WINDOWS
 | 
					
						
							|  |  |  | #  define _PyPathConfig_INIT \
 | 
					
						
							|  |  |  |       {.module_search_path = NULL, \ | 
					
						
							|  |  |  |        .isolated = -1, \ | 
					
						
							|  |  |  |        .site_import = -1} | 
					
						
							|  |  |  | #else
 | 
					
						
							|  |  |  | #  define _PyPathConfig_INIT \
 | 
					
						
							|  |  |  |       {.module_search_path = NULL} | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | /* Note: _PyPathConfig_INIT sets other fields to 0/NULL */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyAPI_DATA(_PyPathConfig) _Py_path_config; | 
					
						
							| 
									
										
										
										
											2019-09-21 01:02:56 +02:00
										 |  |  | #ifdef MS_WINDOWS
 | 
					
						
							|  |  |  | PyAPI_DATA(wchar_t*) _Py_dll_path; | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-27 16:39:22 +02:00
										 |  |  | extern void _PyPathConfig_ClearGlobal(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern PyStatus _PyPathConfig_Calculate( | 
					
						
							|  |  |  |     _PyPathConfig *pathconfig, | 
					
						
							|  |  |  |     const PyConfig *config); | 
					
						
							|  |  |  | extern int _PyPathConfig_ComputeSysPath0( | 
					
						
							|  |  |  |     const PyWideStringList *argv, | 
					
						
							| 
									
										
										
										
											2019-03-19 16:09:27 +01:00
										 |  |  |     PyObject **path0); | 
					
						
							| 
									
										
										
										
											2019-10-04 19:53:43 +02:00
										 |  |  | extern PyStatus _Py_FindEnvConfigValue( | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  |     FILE *env_file, | 
					
						
							|  |  |  |     const wchar_t *key, | 
					
						
							| 
									
										
										
										
											2019-10-04 19:53:43 +02:00
										 |  |  |     wchar_t **value_p); | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-18 04:17:01 +02:00
										 |  |  | #ifdef MS_WINDOWS
 | 
					
						
							|  |  |  | extern wchar_t* _Py_GetDLLPath(void); | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-26 15:51:50 +02:00
										 |  |  | extern PyStatus _PyConfig_WritePathConfig(const PyConfig *config); | 
					
						
							| 
									
										
										
										
											2019-09-23 14:45:47 +02:00
										 |  |  | extern void _Py_DumpPathConfig(PyThreadState *tstate); | 
					
						
							| 
									
										
										
										
											2020-07-08 00:20:37 +02:00
										 |  |  | extern PyObject* _PyPathConfig_AsDict(void); | 
					
						
							| 
									
										
										
										
											2019-09-21 01:02:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-01 03:15:58 +01:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | #endif /* !Py_INTERNAL_PATHCONFIG_H */
 |