Renaming.
[flatland.git] / build.py
index 4c3b766..b3c7b91 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python-for-pytorch
+#!/usr/bin/env python
 
 #
 #  flatland is a simple 2d physical simulator
 #  along with flatland.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-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()