def _is_astropy_source(path=None):
 if (path is None):
  path = os.path.join(os.path.dirname(__file__), os.pardir)
 elif os.path.isfile(path):
  path = os.path.dirname(path)
 source_dir = os.path.abspath(path)
 return os.path.exists(os.path.join(source_dir, '.astropy-root'))

def _is_astropy_source ( path = None ) : if ( path is None ) : path = os . path . join ( os . path . dirname ( __file__ ) , os . pardir ) elif os . path . isfile ( path ) : path = os . path . dirname ( path ) source_dir = os . path . abspath ( path ) return os . path . exists ( os . path . join ( source_dir , '.astropy-root' ) )
returns whether the source for this module is directly in an astropy source distribution or checkout .