X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=build.py;h=9f03c379e8d8397a460cf10d6e1fd281a0cc0a98;hp=cb77b38825fbcfec0e53d3f5ac91bef842a6e26b;hb=4aed0ce274b7c0e379651c28e439375c821c047a;hpb=5d4e9eaeec9263692d39ca840e498a5f1d818eaa diff --git a/build.py b/build.py index cb77b38..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.flatland', headers = [ 'flatland.h' ], sources = [ 'flatland.c' ], - extra_objects = [ '/home/fleuret/sources/python/flatland/flatland_generator.so' ], + extra_objects = [ abs_path + '/flatland_generator.so' ], libraries = [ ], library_dirs = [ ], define_macros = [ ], - relative_to=this_file, with_cuda = False )