Renaming.
[flatland.git] / build.py
index 9f03c37..b3c7b91 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -1,20 +1,40 @@
-#!/usr/bin/env python-for-pytorch
+#!/usr/bin/env python
 
-import os
+#
+#  flatland is a simple 2d physical simulator
+#
+#  Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
+#  Written by Francois Fleuret <francois.fleuret@idiap.ch>
+#
+#  This file is part of flatland
+#
+#  flatland is free software: you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License version 3 as
+#  published by the Free Software Foundation.
+#
+#  flatland is distributed in the hope that it will be useful, but
+#  WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with flatland.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+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()