X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=build.py;h=9f03c379e8d8397a460cf10d6e1fd281a0cc0a98;hp=4f00b970e75d44e724a3fc40fbec43f6ed0e3930;hb=90d1c5704c30e7f1d041e32eacbc2893741110e1;hpb=26abc735ca75a78974c7ced091035e8c27ca1c00 diff --git a/build.py b/build.py index 4f00b97..9f03c37 100755 --- a/build.py +++ b/build.py @@ -3,19 +3,16 @@ import os from torch.utils.ffi import create_extension -this_file = os.path.dirname(__file__) - -print('__file__', __file__) +abs_path = os.path.dirname(os.path.abspath(__file__)) ffi = create_extension( - '_ext.mylib', - headers = [ 'mylib.h' ], - sources = [ 'mylib.c' ], - extra_objects = [ '/home/fleuret/sources/python/flatland/flatland.so' ], + '_ext.flatland', + headers = [ 'flatland.h' ], + sources = [ 'flatland.c' ], + extra_objects = [ abs_path + '/flatland_generator.so' ], libraries = [ ], library_dirs = [ ], define_macros = [ ], - relative_to=this_file, with_cuda = False )