1 2from cffi import FFI 3import sys 4 5ffi = FFI() 6ffi.cdef(""" // some declarations from the man page 7 struct passwd { 8 char *pw_name; 9 ...; 10 }; 11 struct passwd *getpwuid(int uid); 12""") 13C = ffi.verify(""" // passed to the real C compiler 14#include <sys/types.h> 15#include <pwd.h> 16""", libraries=[], # or a list of libraries to link with 17 force_generic_engine=hasattr(sys, '_force_generic_engine_')) 18