How to use the peru.compat.makedirs function in peru

To help you get started, we’ve selected a few peru examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github buildinspace / peru / tests / shared.py View on Github external
def _tmp_root():
    root = os.path.join(tempfile.gettempdir(), 'peru', 'test')
    makedirs(root)
    return root
github buildinspace / peru / peru / plugin.py View on Github external
def _plugin_cache_path(plugin_context, definition, module_fields):
    if not definition.cache_fields:
        # This plugin is not cacheable.
        return os.devnull
    key = _plugin_cache_key(definition, module_fields)
    plugin_cache = os.path.join(plugin_context.plugin_cache_root,
                                definition.type, key)
    makedirs(plugin_cache)
    return plugin_cache
github buildinspace / peru / peru / cache.py View on Github external
def __init__(self, root):
        "Don't instantiate this class directly. Use the Cache() constructor."
        self.root = root
        self.plugins_root = os.path.join(root, "plugins")
        makedirs(self.plugins_root)
        self.tmp_path = os.path.join(root, "tmp")
        makedirs(self.tmp_path)
        self.keyval = KeyVal(os.path.join(root, 'keyval'), self.tmp_path)
        self.trees_path = os.path.join(root, "trees")
        self._empty_tree = None