• Alain Takoudjou's avatar
    slapos.cookbook: add new recipe for python promises plugin script generation with eggs · 6f7b3a31
    Alain Takoudjou authored
    This recipe will be used to generate promise in etc/plugin dir. It solve the problem of promise eggs
    dependencies and allow to set custom parameter to use in promise.
    
    The generated script will looks like:
    
        import sys
        sys.path[0:0] = [
          ...
        ]
    
        extra_config_dict = {
          'KEY': 'VALUE'
        }
    
        CONTENT
    
    CONTENT is a python code, the expected content looks like:
    
        from namespace.module import RunPromise
    
    then the promise section in buildout will be something like:
    
        [my-promise]
        recipe = slapos.cookbook:promise.plugin
        eggs =
          NAME
          ...
        output = OUTPUT
        content =
          from namespace.module import RunPromise
    
        config-KEY = VALUE
    6f7b3a31
promise_plugin.py 4.6 KB