Created
June 25, 2015 06:23
-
-
Save hosackm/e46a268e7beadcb17f0d to your computer and use it in GitHub Desktop.
pymidi cffi backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
from cffi import FFI | |
__all__ = ('ffi',) | |
p = subprocess.Popen(['clang -E include/portmidi.h'], | |
shell=True, stdout=subprocess.PIPE) | |
code = p.communicate()[0] | |
ffi = FFI() | |
ffi.cdef(code) | |
if __name__ == '__main__': | |
ffi.set_source('_pymidi', None) | |
ffi.compile() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment