Update.
[flatland.git] / build.py
index cb77b38..9f03c37 100755 (executable)
--- 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
 )