parameters: ()
return_statement: return any(
              frame.f_globals['__file__'].endswith('setup.py')
              for frame, line in traceback.walk_stack(None)
          )
docstring: Detect if pip is being imported in a build script. Ref #2355.
docstring_summary: Detect if pip is being imported in a build script. Ref #2355.
docstring_tokens: Detect if pip is being imported in a build script . Ref #2355 .
function: def pip_imported_during_build():
          """
          Detect if pip is being imported in a build script. Ref #2355.
          """
          import traceback
          return any(
              frame.f_globals['__file__'].endswith('setup.py')
              for frame, line in traceback.walk_stack(None)
          )
function_tokens: def pip_imported_during_build ( ) : import traceback return any ( frame . f_globals [ '__file__' ] . endswith ( 'setup.py' ) for frame , line in traceback . walk_stack ( None ) )