From: Francois Fleuret Date: Wed, 1 Mar 2017 15:07:52 +0000 (+0100) Subject: Finishing the renaming. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d4e9eaeec9263692d39ca840e498a5f1d818eaa;p=flatland.git Finishing the renaming. --- diff --git a/Makefile b/Makefile index b846106..3483558 100644 --- a/Makefile +++ b/Makefile @@ -29,12 +29,12 @@ CXXFLAGS += -I/usr/include/cairo -DCAIRO_SUPPORT LDFLAGS += -lcairo -all: flatland.so TAGS +all: flatland_generator.so TAGS TAGS: *.cc *.h etags *.cc *.h -flatland.so: sequence_generator.o misc.o \ +flatland_generator.so: sequence_generator.o misc.o \ universe.o \ polygon.o \ canvas.o canvas_cairo.o diff --git a/build.py b/build.py index 4f00b97..cb77b38 100755 --- a/build.py +++ b/build.py @@ -8,10 +8,10 @@ this_file = os.path.dirname(__file__) print('__file__', __file__) ffi = create_extension( - '_ext.mylib', - headers = [ 'mylib.h' ], - sources = [ 'mylib.c' ], - extra_objects = [ '/home/fleuret/sources/python/flatland/flatland.so' ], + '_ext.flatland', + headers = [ 'flatland.h' ], + sources = [ 'flatland.c' ], + extra_objects = [ '/home/fleuret/sources/python/flatland/flatland_generator.so' ], libraries = [ ], library_dirs = [ ], define_macros = [ ], diff --git a/mylib.c b/flatland.c similarity index 98% rename from mylib.c rename to flatland.c index 6d62c24..13da6fd 100644 --- a/mylib.c +++ b/flatland.c @@ -17,7 +17,7 @@ */ -#include "flatland.h" +#include "sequence_generator.h" int generate_sequence(long nb_sequences, THByteTensor *output) { long nb_images_per_sequence = 5; diff --git a/mylib.h b/flatland.h similarity index 100% rename from mylib.h rename to flatland.h diff --git a/test.py b/test.py index bf51360..314e03d 100755 --- a/test.py +++ b/test.py @@ -40,10 +40,10 @@ def sequences_to_image(x): ###################################################################### -from _ext import mylib +from _ext import flatland x = torch.ByteTensor() -mylib.generate_sequence(10, x) +flatland.generate_sequence(10, x) sequences_to_image(x).save('sequences.png')