How to use the cppimport.checksum function in cppimport

To help you get started, we’ve selected a few cppimport 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 tbenthompson / cppimport / cppimport / importer.py View on Github external
def template_and_build(filepath, module_data):
    # Don't import until here to reduce startup time.
    import cppimport.templating as templating
    import cppimport.build_module as build_module
    quiet_print("Compiling " + filepath)
    templating.run_templating(module_data)
    build_module.build_module(module_data)
    cppimport.checksum.checksum_save(module_data)
github tbenthompson / cppimport / cppimport / importer.py View on Github external
def check_checksum(module_data):
    if cppimport.config.should_force_rebuild:
        return False
    if not cppimport.checksum.is_checksum_current(module_data):
        return False
    quiet_print("Matching checksum for " + module_data['filepath'] + " --> not compiling")
    return True