コード例 #1
0
ファイル: please_parser.py プロジェクト: alamaison/please
def run_post_build_function(handle, package, name, output):
    try:
        callback = ffi.from_handle(handle)
        callback(ffi_to_string(name), ffi_to_string(output).strip().split('\n'))
        return ffi.NULL
    except DeferParse:
        return ffi_from_string("Don't try to subinclude() from inside a post-build function")
    except Exception as err:
        return ffi_from_string(str(err))
コード例 #2
0
def run_post_build_function(handle, package, name, output):
    try:
        callback = ffi.from_handle(handle)
        callback(ffi_to_string(name), ffi_to_string(output).strip().split('\n'))
        return ffi.NULL
    except DeferParse:
        return ffi_from_string("Don't try to subinclude() from inside a post-build function")
    except Exception as err:
        return ffi_from_string(str(err))
コード例 #3
0
ファイル: please_parser.py プロジェクト: alamaison/please
def run_pre_build_function(handle, package, name):
    try:
        callback = ffi.from_handle(handle)
        callback(ffi_to_string(name))
        return ffi.NULL
    except DeferParse:
        return ffi_from_string("Don't try to subinclude() from inside a pre-build function")
    except Exception as err:
        return ffi_from_string(str(err))
コード例 #4
0
def run_pre_build_function(handle, package, name):
    try:
        callback = ffi.from_handle(handle)
        callback(ffi_to_string(name))
        return ffi.NULL
    except DeferParse:
        return ffi_from_string("Don't try to subinclude() from inside a pre-build function")
    except Exception as err:
        return ffi_from_string(str(err))