parameters: ()
return_statement: return sitepackages
docstring: Returns a list containing all global site-packages directories
      (and possibly site-python).
  
      For each directory present in the global ``PREFIXES``, this function
      will find its `site-packages` subdirectory depending on the system
      environment, and will return a list of full paths.
docstring_summary: Returns a list containing all global site-packages directories
      (and possibly site-python).
docstring_tokens: Returns a list containing all global site - packages directories ( and possibly site - python ) .
function: def getsitepackages():
      """Returns a list containing all global site-packages directories
      (and possibly site-python).
  
      For each directory present in the global ``PREFIXES``, this function
      will find its `site-packages` subdirectory depending on the system
      environment, and will return a list of full paths.
      """
      sitepackages = []
      seen = set()
  
      for prefix in PREFIXES:
          if not prefix or prefix in seen:
              continue
          seen.add(prefix)
  
          if sys.platform in ('os2emx', 'riscos'):
              sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
          elif os.sep == '/':
              sitepackages.append(os.path.join(prefix, "lib",
                                          "python" + sys.version[:3],
                                          "site-packages"))
              sitepackages.append(os.path.join(prefix, "lib", "site-python"))
          else:
              sitepackages.append(prefix)
              sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
      return sitepackages
function_tokens: def getsitepackages ( ) : sitepackages = [ ] seen = set ( ) for prefix in PREFIXES : if not prefix or prefix in seen : continue seen . add ( prefix ) if sys . platform in ( 'os2emx' , 'riscos' ) : sitepackages . append ( os . path . join ( prefix , "Lib" , "site-packages" ) ) elif os . sep == '/' : sitepackages . append ( os . path . join ( prefix , "lib" , "python" + sys . version [ : 3 ] , "site-packages" ) ) sitepackages . append ( os . path . join ( prefix , "lib" , "site-python" ) ) else : sitepackages . append ( prefix ) sitepackages . append ( os . path . join ( prefix , "lib" , "site-packages" ) ) return sitepackages