changeset 18: |
a1137af05c8d |
parent: |
315fedf35bc7
|
author: |
ellis <ellis@rwest.io> |
date: |
Mon, 29 May 2023 21:46:21 -0400 |
permissions: |
-rw-r--r-- |
description: |
removed fig, use sexprs instead |
4 print("pip install cffi, included with PyPy") 11 def parse_header(header): 12 h = open(header, "r").read().lstrip() 14 r"^(#|\s*\/*\*|extern).*[\r\n]|.*\"C\"$|^(?:[\t ]*(?:\r?\n|\r))+", 39 def compile(ffi, lib_dir, v): 40 os.environ["LD_RUN_PATH"] = os.path.abspath(lib_dir) 41 ffi.compile(verbose=v) 44 if __name__ == "__main__": 45 build_dir = pathlib.Path(__file__).parent 46 cdef = parse_header(build_dir / "demo.h") 48 compile(init_ffi(cdef), build_dir, True)