'Add the app and its ext eggs into the pth file
PTH files need paths relative to the pth file, not APPS_ROOT'

def add(self, app):

    if os.path.isabs(app.path):
        module_path = os.path.join(app.abs_path, 'src')
        self._entries.add(module_path)
        LOG.debug(('Add    to    %s:    %s' % (self._path, module_path)))
        gen_py_path = os.path.join(app.abs_path, 'gen-py')
        if os.path.exists(gen_py_path):
            self._entries.add(gen_py_path)
            LOG.debug(('Add    to    %s:    %s' % (self._path, gen_py_path)))
        for py in app.find_ext_pys():
            ext_eggs = glob.glob(os.path.join(py, 'dist', '*.egg'))
            self._entries.update(ext_eggs)
            LOG.debug(('Add    to    %s:    %s' % (self._path, ext_eggs)))
        egg_files = glob.glob(os.path.join(app.path, 'ext-eggs', '*.egg'))
        self._entries.update(egg_files)
        LOG.debug(('Add    to    %s:    %s' % (self._path, egg_files)))
    else:
        module_path = self._relpath(os.path.join(app.abs_path, 'src'))
        self._entries.add(module_path)
        LOG.debug(('Add    to    %s:    %s' % (self._path, module_path)))
        gen_py_path = self._relpath(os.path.join(app.abs_path, 'gen-py'))
        if os.path.exists(os.path.join(app.abs_path, 'gen-py')):
            self._entries.add(gen_py_path)
            LOG.debug(('Add    to    %s:    %s' % (self._path, gen_py_path)))
        for py in app.find_ext_pys():
            ext_eggs = [self._relpath(egg) for egg in glob.glob(os.path.join(py, 'dist', '*.egg'))]
            self._entries.update(ext_eggs)
            LOG.debug(('Add    to    %s:    %s' % (self._path, ext_eggs)))
        egg_files = [self._relpath(egg_file) for egg_file in glob.glob(os.path.join(app.path, 'ext-eggs', '*.egg'))]
        self._entries.update(egg_files)
        LOG.debug(('Add    to    %s:    %s' % (self._path, egg_files)))
