Seems to work quite well.
[flatland.git] / build.py
1 #!/usr/bin/env python-for-pytorch
2
3 import os
4 from torch.utils.ffi import create_extension
5
6 this_file = os.path.dirname(__file__)
7
8 print('__file__', __file__)
9
10 ffi = create_extension(
11     '_ext.mylib',
12     headers = [ 'mylib.h' ],
13     sources = [ 'mylib.c' ],
14     extra_objects = [ '/home/fleuret/sources/python/flatland/flatland.so' ],
15     libraries = [ ],
16     library_dirs = [ ],
17     define_macros = [ ],
18     relative_to=this_file,
19     with_cuda = False
20 )
21
22 if __name__ == '__main__':
23     ffi.build()