X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=build.py;h=b3c7b919dccb669fe12a7f3952c1fd9e195b8267;hp=7df40c0644125e0f161469443e87bcff2a49a0ba;hb=HEAD;hpb=e1cc94949e11a73b0e8437f1743293dce51ad76c diff --git a/build.py b/build.py index 7df40c0..b3c7b91 100755 --- a/build.py +++ b/build.py @@ -21,21 +21,20 @@ # along with flatland. If not, see . # -import os +from os import path from torch.utils.ffi import create_extension -abs_path = os.path.dirname(os.path.abspath(__file__)) +abs_path = path.dirname(path.abspath(__file__)) ffi = create_extension( - '_ext.flatland', + 'flatland', headers = [ 'flatland.h' ], sources = [ 'flatland.c' ], - extra_objects = [ abs_path + '/flatland_generator.so' ], + extra_objects = [ abs_path + '/libflatland.so' ], libraries = [ ], library_dirs = [ ], define_macros = [ ], with_cuda = False ) -if __name__ == '__main__': - ffi.build() +ffi.build()