# Path: g_sorcery/compatibility.py
# class TemporaryDirectory(object):
#     def __init__(self):
#     def __del__(self):
# 
# Path: g_sorcery/exceptions.py
# class DependencyError(GSorceryError):
#     pass


from .compatibility import basestring
from .exceptions import DependencyError
            self.template.append("")

        if hasattr(layout, "vars_after_inherit"):
            self._append_vars_to_template(layout.vars_after_inherit)
            self.template.append("")

        self.template.append('DESCRIPTION="%(description)s"')
        self.template.append("")

        if hasattr(layout, "vars_after_description"):
            self._append_vars_to_template(layout.vars_after_description)
            self.template.append("")

        self.template.append('SLOT="0"')
        self.template.append('KEYWORDS="~amd64 ~x86"')
        self.template.append("")

        if hasattr(layout, "vars_after_keywords"):
            self._append_vars_to_template(layout.vars_after_keywords)
            self.template.append("")


    def _append_vars_to_template(self, variables):
        """
        Add a list of variables to the end of template.

        Args:
            variables: List of variables.
        """
        for var in variables:

# Path: g_sorcery/compatibility.py
# class TemporaryDirectory(object):
#     def __init__(self):
#     def __del__(self):
# 
# Path: g_sorcery/exceptions.py
# class DependencyError(GSorceryError):
#     pass


# Path: g_sorcery/ebuild.py
from .compatibility import basestring
from .exceptions import DependencyError

            self.template.append("")

        if hasattr(layout, "vars_after_inherit"):
            self._append_vars_to_template(layout.vars_after_inherit)
            self.template.append("")

        self.template.append('DESCRIPTION="%(description)s"')
        self.template.append("")

        if hasattr(layout, "vars_after_description"):
            self._append_vars_to_template(layout.vars_after_description)
            self.template.append("")

        self.template.append('SLOT="0"')
        self.template.append('KEYWORDS="~amd64 ~x86"')
        self.template.append("")

        if hasattr(layout, "vars_after_keywords"):
            self._append_vars_to_template(layout.vars_after_keywords)
            self.template.append("")


    def _append_vars_to_template(self, variables):
        """
        Add a list of variables to the end of template.

        Args:
            variables: List of variables.
        """
        for var in variables:

            if isinstance(var, basestring):