Using a Makefile instead of setup.py and that makeproject thing
4 files changed, 22 insertions(+), 24 deletions(-)

M .hgignore
A => Makefile
R makeproject => 
R setup.py => 
M .hgignore +1 -0
@@ 3,3 3,4 @@ build
 \.pyc$
 \.so$
 \.o$
+^mandelbro.c$

          
A => Makefile +21 -0
@@ 0,0 1,21 @@ 
+all: mandelbro.so
+
+mandelbro.o:
+	fasm mandelbro.asm mandelbro.o
+
+mandelbro.c:
+	cython mandelbro.pyx -o mandelbro.c
+
+mandelbro.so: mandelbro.o mandelbro.c
+	gcc cmandelbro.c mandelbro.c mandelbro.o \
+		-shared -fPIC \
+		`pkg-config --libs opencv python-2.7 --cflags opencv python-2.7` \
+		-o mandelbro.so
+
+test:
+	# We can import it? Good enough for me ...
+	python2.7 -c "import mandelbro; mandelbro.render_to_raw((-1,2,3,-4), (10, 10))"
+
+clean:
+	rm *.o
+	rm mandelbro.c

          
R makeproject =>  +0 -8
@@ 1,8 0,0 @@ 
-# Compiles mandelbro.asm -> mandelbrolib.so
-fasm mandelbro.asm m.o && ld -shared m.o -o mandelbroasmlib.so && rm -f m.o && \
-
-gcc cmandelbro.c mandelbroasmlib.so -shared -fPIC `pkg-config --libs opencv python-2.7 --cflags opencv python-2.7` -o mandelbrolib.so $* && \
-
-python2.7 setup.py build_ext --inplace --force $* && \
-
-LD_LIBRARY_PATH=`pwd` python2.7 -c "import mandelbro; mandelbro.render_to_raw((-1,2,3,-4), (400, 950))"

          
R setup.py =>  +0 -16
@@ 1,16 0,0 @@ 
-from distutils.core import setup
-from distutils.extension import Extension
-from Cython.Distutils import build_ext
-
-ext_modules = [
-        Extension('mandelbro',
-                  ['mandelbro.pyx'],
-                  libraries=[':mandelbrolib.so'],
-                  )
-]
-
-setup(
-    name = 'Mandelbro rendering library thingy',
-    cmdclass = {'build_ext': build_ext},
-    ext_modules = ext_modules
-)