mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 15:41:43 +00:00 
			
		
		
		
	Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
This commit is contained in:
		
							parent
							
								
									b3255ed8c9
								
							
						
					
					
						commit
						2da0fceba7
					
				
					 8 changed files with 56 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -72,6 +72,7 @@ int Py_VerboseFlag; /* Needed by import.c */
 | 
			
		|||
int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
 | 
			
		||||
int Py_InspectFlag; /* Needed to determine whether to exit at SystemError */
 | 
			
		||||
int Py_NoSiteFlag; /* Suppress 'import site' */
 | 
			
		||||
int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
 | 
			
		||||
int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
 | 
			
		||||
int Py_FrozenFlag; /* Needed by getpath.c */
 | 
			
		||||
int Py_UnicodeFlag = 0; /* Needed by compile.c */
 | 
			
		||||
| 
						 | 
				
			
			@ -172,6 +173,8 @@ Py_InitializeEx(int install_sigs)
 | 
			
		|||
		Py_VerboseFlag = add_flag(Py_VerboseFlag, p);
 | 
			
		||||
	if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
 | 
			
		||||
		Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
 | 
			
		||||
	if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
 | 
			
		||||
		Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
 | 
			
		||||
 | 
			
		||||
	interp = PyInterpreterState_New();
 | 
			
		||||
	if (interp == NULL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue