1 #!/usr/bin/env python-for-pytorch
4 # flatland is a simple 2d physical simulator
6 # Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
7 # Written by Francois Fleuret <francois.fleuret@idiap.ch>
9 # This file is part of flatland
11 # flatland is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License version 3 as
13 # published by the Free Software Foundation.
15 # flatland is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with flatland. If not, see <http://www.gnu.org/licenses/>.
25 from torch.utils.ffi import create_extension
27 abs_path = os.path.dirname(os.path.abspath(__file__))
29 ffi = create_extension(
31 headers = [ 'flatland.h' ],
32 sources = [ 'flatland.c' ],
33 extra_objects = [ abs_path + '/flatland_generator.so' ],
40 if __name__ == '__main__':