mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605)
This commit is contained in:
		
							parent
							
								
									c6b292cdee
								
							
						
					
					
						commit
						8f023a2f66
					
				
					 11 changed files with 82 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -2922,13 +2922,7 @@ _PySys_InitMain(PyThreadState *tstate)
 | 
			
		|||
    SET_SYS_FROM_WSTR("base_prefix", config->base_prefix);
 | 
			
		||||
    SET_SYS_FROM_WSTR("exec_prefix", config->exec_prefix);
 | 
			
		||||
    SET_SYS_FROM_WSTR("base_exec_prefix", config->base_exec_prefix);
 | 
			
		||||
    {
 | 
			
		||||
        PyObject *str = PyUnicode_FromString(PLATLIBDIR);
 | 
			
		||||
        if (str == NULL) {
 | 
			
		||||
            return -1;
 | 
			
		||||
        }
 | 
			
		||||
        SET_SYS_FROM_STRING("platlibdir", str);
 | 
			
		||||
    }
 | 
			
		||||
    SET_SYS_FROM_WSTR("platlibdir", config->platlibdir);
 | 
			
		||||
 | 
			
		||||
    if (config->pycache_prefix != NULL) {
 | 
			
		||||
        SET_SYS_FROM_WSTR("pycache_prefix", config->pycache_prefix);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue